結果
問題 | No.1439 Let's Compare!!!! |
ユーザー | da_ab |
提出日時 | 2021-03-27 07:13:58 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,136 bytes |
コンパイル時間 | 177 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 50,956 KB |
最終ジャッジ日時 | 2024-05-06 21:47:23 |
合計ジャッジ時間 | 9,820 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 442 ms
49,896 KB |
testcase_01 | AC | 439 ms
43,888 KB |
testcase_02 | AC | 441 ms
43,884 KB |
testcase_03 | AC | 452 ms
44,152 KB |
testcase_04 | AC | 451 ms
44,008 KB |
testcase_05 | AC | 445 ms
43,892 KB |
testcase_06 | AC | 448 ms
43,888 KB |
testcase_07 | AC | 653 ms
44,396 KB |
testcase_08 | AC | 732 ms
44,140 KB |
testcase_09 | AC | 499 ms
43,756 KB |
testcase_10 | TLE | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
ソースコード
# 1439 : Let's Compare!!!! import numpy as np from sys import stdin N=int(stdin.readline()) if N<100: blockSize=N else: blockSize=100 S=0 T=1 paddingSize=(blockSize-N%blockSize)%blockSize padding="0"*paddingSize N+=paddingSize strS=padding+stdin.readline().rstrip() strT=padding+stdin.readline().rstrip() strST=[0]*2 strST[S]=[0]*int(np.floor(N/blockSize)) strST[T]=[0]*int(np.floor(N/blockSize)) k=0 for i in range(int(np.floor(N/blockSize))): strST[S][i]=strS[k:k+blockSize] strST[T][i]=strT[k:k+blockSize] k+=blockSize Q=int(stdin.readline()) for _ in range(Q): c,x,y=stdin.readline().split() x=(int(x)-1)+paddingSize if c=='S': tStr=S else: tStr=T nThBlock=int(np.floor(x/blockSize)) nThChar=x%blockSize strST[tStr][nThBlock]=strST[tStr][nThBlock][0:nThChar]+y+strST[tStr][nThBlock][nThChar+1:] result='=' for i in range(int(np.floor(N/blockSize))): intS=int(strST[S][i]) intT=int(strST[T][i]) if strST[S]>strST[T]: result='>' break elif strST[S]<strST[T]: result='<' print(result)