結果
| 問題 | No.2454 Former < Latter |
| コンテスト | |
| ユーザー |
srjywrdnprkt
|
| 提出日時 | 2023-07-07 16:06:20 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 360 bytes |
| 記録 | |
| コンパイル時間 | 1,168 ms |
| コンパイル使用メモリ | 210,820 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-07-01 15:07:53 |
| 合計ジャッジ時間 | 33,107 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 11 TLE * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve(){
string S;
int N, ans=0;
cin >> N >> S;
for (int i=1; i<N; i++){
if (S.substr(0, i) < S.substr(i, N-i)) ans++;
}
cout << ans << endl;
}
int main(){
int T;
cin >> T;
while(T){
T--;
solve();
}
return 0;
}
srjywrdnprkt