結果

問題 No.2745 String Swap Battle
コンテスト
ユーザー Nzt3
提出日時 2024-04-14 16:37:59
言語 C++17(gcc12)
(gcc 12.4.0 + boost 1.90.0)
コンパイル:
g++-12 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 627 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,897 ms
コンパイル使用メモリ 258,548 KB
実行使用メモリ 12,024 KB
最終ジャッジ日時 2026-07-04 11:54:56
合計ジャッジ時間 6,113 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 18
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include "testlib.h"
#include<string>
#include<cassert>
using namespace std;

const int MIN_N = 2;
const int MAX_N = 100'000;
const int MAX_SUM_S = 200'000;
const int MIN_S = 2;
const int MAX_S = 100'000;

int main() {
    registerValidation();

    int N=inf.readInt(MIN_N,MAX_N);
    inf.readEoln();

    int sum_s=0;
    for(int i = 0; i < N; i++) {
        string s = inf.readString();
        for(int j = 0; j < (int)s.size(); j++) {
            assert('a' <= s[j] && s[j] <= 'z');
        }
        sum_s += s.size();
        assert((int)s.size() <= MAX_S);
    }
    inf.readEof();
    
    assert(sum_s <= MAX_SUM_S);
}
0