結果

問題 No.2361 Many String Compare Queries
ユーザー とりゐとりゐ
提出日時 2023-01-14 18:05:14
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 219 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 86,984 KB
実行使用メモリ 263,216 KB
最終ジャッジ日時 2023-09-13 11:19:34
合計ジャッジ時間 5,365 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,676 KB
testcase_01 AC 71 ms
71,292 KB
testcase_02 AC 70 ms
71,284 KB
testcase_03 AC 84 ms
76,876 KB
testcase_04 AC 79 ms
76,188 KB
testcase_05 AC 69 ms
71,288 KB
testcase_06 AC 71 ms
71,148 KB
testcase_07 AC 112 ms
77,640 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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+1]<s[l:r+1]:
        ans+=1
  print(ans)
0