Submission #23669

#TimeUsernameProblemLanguageResultExecution timeMemory
23669leejseo동전 게임 (KOI15_coin)Cpython 2
100 / 100
398 ms24 KiB
def main(): k = int(raw_input()) c = int(raw_input()) L = [] for i in range (c) : s = map(int, raw_input().split()) L.append(s[::]) for i in range (c) : m = L[i][0] n = L[i][1] if (m <= n and n > m + (k-m+1)/2) or (m > n and m > n + (k-n)/2 +1) : print 0 else : print 1 return 0 main()
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...