結果
問題 | No.2684 折々の色 |
ユーザー | katonyonko |
提出日時 | 2024-03-20 23:45:10 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,675 bytes |
コンパイル時間 | 202 ms |
コンパイル使用メモリ | 81,828 KB |
実行使用メモリ | 188,188 KB |
最終ジャッジ日時 | 2024-03-20 23:45:36 |
合計ジャッジ時間 | 25,263 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 43 ms
55,600 KB |
testcase_01 | AC | 44 ms
55,600 KB |
testcase_02 | AC | 47 ms
57,688 KB |
testcase_03 | AC | 45 ms
55,600 KB |
testcase_04 | AC | 47 ms
57,688 KB |
testcase_05 | AC | 43 ms
55,600 KB |
testcase_06 | AC | 46 ms
55,600 KB |
testcase_07 | AC | 43 ms
55,600 KB |
testcase_08 | AC | 45 ms
55,600 KB |
testcase_09 | AC | 45 ms
55,600 KB |
testcase_10 | AC | 45 ms
55,600 KB |
testcase_11 | AC | 426 ms
128,068 KB |
testcase_12 | AC | 323 ms
117,144 KB |
testcase_13 | AC | 470 ms
137,384 KB |
testcase_14 | AC | 260 ms
107,584 KB |
testcase_15 | AC | 354 ms
117,204 KB |
testcase_16 | AC | 150 ms
87,200 KB |
testcase_17 | AC | 316 ms
111,556 KB |
testcase_18 | AC | 437 ms
132,284 KB |
testcase_19 | AC | 457 ms
139,672 KB |
testcase_20 | AC | 348 ms
123,240 KB |
testcase_21 | AC | 181 ms
92,196 KB |
testcase_22 | AC | 474 ms
134,636 KB |
testcase_23 | AC | 402 ms
127,892 KB |
testcase_24 | AC | 225 ms
98,224 KB |
testcase_25 | AC | 288 ms
109,740 KB |
testcase_26 | AC | 485 ms
142,404 KB |
testcase_27 | AC | 324 ms
112,980 KB |
testcase_28 | AC | 375 ms
126,200 KB |
testcase_29 | AC | 725 ms
183,924 KB |
testcase_30 | AC | 661 ms
183,548 KB |
testcase_31 | AC | 650 ms
183,440 KB |
testcase_32 | AC | 735 ms
186,064 KB |
testcase_33 | AC | 692 ms
188,188 KB |
testcase_34 | AC | 686 ms
183,164 KB |
testcase_35 | AC | 672 ms
183,388 KB |
testcase_36 | AC | 639 ms
184,504 KB |
testcase_37 | AC | 621 ms
182,024 KB |
testcase_38 | AC | 792 ms
187,596 KB |
testcase_39 | AC | 779 ms
187,600 KB |
testcase_40 | AC | 786 ms
187,588 KB |
testcase_41 | AC | 786 ms
187,608 KB |
testcase_42 | AC | 754 ms
187,596 KB |
testcase_43 | AC | 792 ms
187,600 KB |
testcase_44 | AC | 791 ms
187,612 KB |
testcase_45 | AC | 773 ms
187,608 KB |
testcase_46 | AC | 800 ms
187,588 KB |
testcase_47 | AC | 46 ms
55,600 KB |
testcase_48 | AC | 45 ms
55,600 KB |
testcase_49 | AC | 45 ms
55,600 KB |
testcase_50 | AC | 45 ms
55,600 KB |
testcase_51 | AC | 45 ms
55,600 KB |
testcase_52 | AC | 45 ms
55,600 KB |
testcase_53 | AC | 46 ms
55,600 KB |
testcase_54 | AC | 45 ms
55,600 KB |
testcase_55 | AC | 45 ms
55,600 KB |
testcase_56 | WA | - |
testcase_57 | AC | 44 ms
55,600 KB |
ソースコード
import io import sys from collections import defaultdict, deque, Counter from itertools import permutations, combinations, accumulate from heapq import heappush, heappop from bisect import bisect_right, bisect_left from math import gcd import math _INPUT = """\ 6 3 3 100 120 140 80 100 160 75 320 360 160 50 0 5 10 30 2 4 0 0 0 0 0 10 20 30 40 50 60 70 80 90 """ def solve(test): N,M=map(int,input().split()) X=list(map(int,input().split())) C=[list(map(int,input().split())) for _ in range(N)] s=set([tuple([C[i][-1]*C[i][j] for j in range(M)]) for i in range(N)]) ans='No' for i in range(N): tmp=[] if C[i][-1]==100: if C[i][:M]==X: ans='Yes' break else: for j in range(M): if (10000*X[j]-100*C[i][-1]*C[i][j])%(100-C[i][-1])==0: tmp.append((10000*X[j]-100*C[i][-1]*C[i][j])//(100-C[i][-1])) if tuple(tmp) in s: ans='Yes' break print(ans) def random_input(): from random import randint,shuffle N=randint(1,10) M=randint(1,N) A=list(range(1,M+1))+[randint(1,M) for _ in range(N-M)] shuffle(A) return (" ".join(map(str, [N,M]))+"\n"+" ".join(map(str, A))+"\n")*3 def simple_solve(): return [] def main(test): if test==0: solve(0) elif test==1: sys.stdin = io.StringIO(_INPUT) case_no=int(input()) for _ in range(case_no): solve(0) else: for i in range(1000): sys.stdin = io.StringIO(random_input()) x=solve(1) y=simple_solve() if x!=y: print(i,x,y) print(*[line for line in sys.stdin],sep='') break #0:提出用、1:与えられたテスト用、2:ストレステスト用 main(0)