Intel Code Challenge Final Round (Div. 1 + Div. 2, Combined)
はい。
http://codeforces.com/contest/724
A. Checking the Calendar
ざっくりと大意
・とある月の1日の曜日と次の月の1日の曜日が入力の1,2行目と等しいようなものがありえるか。
Python2
w=["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday","monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"] s1=raw_input() s2=raw_input() if s2==w[w.index(s1)+3] or s2==w[w.index(s1)+2] or s2==w[w.index(s1)]: print 'YES' else: print 'NO'
当月が31日なら次月は3つズレ、当月が30日なら次月は2つズレ、当月が28日なら次月は同じ曜日から開始。あとは日曜日から月曜日にループするのを気をつける。
B. Batch Sort
ざっくりと大意
・全体に対して任意の2列を入れ替えと各行に対して2つの数を入れ替えて全ての行を昇順にできるか??
・めんどくさいのでまた今度