結果
| 問題 |
No.2361 Many String Compare Queries
|
| コンテスト | |
| ユーザー |
とりゐ
|
| 提出日時 | 2023-01-14 18:04:35 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 217 bytes |
| コンパイル時間 | 176 ms |
| コンパイル使用メモリ | 82,668 KB |
| 実行使用メモリ | 265,612 KB |
| 最終ジャッジ日時 | 2024-06-30 20:40:21 |
| 合計ジャッジ時間 | 4,829 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 6 TLE * 1 -- * 7 |
ソースコード
n,q=map(int,input().split())
s=input()
ANS=[]
for _ in range(q):
l,r=map(lambda x:int(x)-1,input().split())
ans=0
for i in range(n):
for j in range(i,n):
if s[i:j]<s[l:r+1]:
ans+=1
print(ans)
とりゐ