結果

問題 No.1703 Much Matching
ユーザー 河野竜也河野竜也
提出日時 2022-06-22 22:25:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 330 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 30,720 KB
最終ジャッジ日時 2024-04-24 02:21:44
合計ジャッジ時間 24,911 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
16,128 KB
testcase_01 AC 28 ms
10,752 KB
testcase_02 AC 27 ms
10,752 KB
testcase_03 AC 219 ms
14,976 KB
testcase_04 AC 160 ms
13,568 KB
testcase_05 AC 439 ms
19,328 KB
testcase_06 AC 1,004 ms
19,072 KB
testcase_07 AC 82 ms
11,392 KB
testcase_08 AC 1,364 ms
26,368 KB
testcase_09 AC 1,287 ms
23,424 KB
testcase_10 AC 236 ms
13,056 KB
testcase_11 AC 451 ms
16,896 KB
testcase_12 AC 103 ms
11,776 KB
testcase_13 AC 530 ms
16,000 KB
testcase_14 AC 45 ms
11,136 KB
testcase_15 AC 590 ms
20,480 KB
testcase_16 AC 589 ms
14,720 KB
testcase_17 AC 707 ms
15,744 KB
testcase_18 AC 35 ms
10,752 KB
testcase_19 AC 1,468 ms
23,424 KB
testcase_20 AC 188 ms
11,520 KB
testcase_21 AC 1,768 ms
26,880 KB
testcase_22 AC 957 ms
23,168 KB
testcase_23 AC 620 ms
16,896 KB
testcase_24 AC 46 ms
11,008 KB
testcase_25 AC 182 ms
13,568 KB
testcase_26 AC 698 ms
21,504 KB
testcase_27 AC 784 ms
15,744 KB
testcase_28 AC 1,705 ms
30,720 KB
testcase_29 AC 515 ms
17,920 KB
testcase_30 AC 574 ms
17,792 KB
testcase_31 AC 157 ms
13,568 KB
testcase_32 AC 952 ms
21,248 KB
testcase_33 AC 859 ms
23,040 KB
testcase_34 AC 86 ms
11,520 KB
testcase_35 AC 229 ms
13,440 KB
testcase_36 TLE -
testcase_37 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,q=map(int,input().split())
check=[[0]*m for i in range(n)]
for i in range(q):
  a,b=map(int,input().split())
  check[a-1][b-1]=1
d=[[0]*(m+1) for i in range(n+1)]
for i in range(1,n+1):
  for j in range(1,m+1):
    if check[i-1][j-1]:
      d[i][j]=d[i-1][j-1]+1
    else:
      d[i][j]=max(d[i-1][j],d[i][j-1])
print(d[n][m])
0