結果

問題 No.3109 Swap members
ユーザー ponjuice
提出日時 2025-04-17 00:48:19
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 1,098 bytes
コンパイル時間 8,787 ms
コンパイル使用メモリ 352,704 KB
実行使用メモリ 39,532 KB
最終ジャッジ日時 2025-04-17 00:48:44
合計ジャッジ時間 19,576 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 52
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

const ll min_nk = 1;
const ll max_nk = 100'000;

const string str_contrains = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

int main(){
    registerValidation();

    ll n = inf.readLong(min_nk, max_nk);
    inf.readSpace();
    ll k = inf.readLong(min_nk, max_nk);
    inf.readEoln();

    assert(k < n);
    
    set<string> names;
    for (int i = 0; i < n; i++) {
        string s = inf.readString();
        assert(1 <= s.size() && s.size() <= 32);
        for(char c : s) {
            assert(str_contrains.find(c) != string::npos);
        }
        assert(names.find(s) == names.end());
        names.insert(s);
    }

    set<string> names2;
    for (int i = 0; i < n; i++) {
        string s = inf.readString();
        assert(1 <= s.size() && s.size() <= 32);
        for(char c : s) {
            assert(str_contrains.find(c) != string::npos);
        }
        assert(names2.find(s) == names2.end());
        names2.insert(s);
    }
    inf.readEof();

    assert(names == names2);
}
0