結果

問題 No.3497 Sign up for traP
コンテスト
ユーザー aorinngo0606
提出日時 2026-04-17 20:28:01
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 1,103 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,400 ms
コンパイル使用メモリ 330,684 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-17 20:28:14
合計ジャッジ時間 3,343 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
typedef long long ll;
typedef long double lb;
using namespace std;
#define all(x) (x).begin(), (x).end()
#define OVERLOAD_REP(_1, _2, _3, name, ...) name
#define REP1(i, n) for (auto i = std::decay_t<decltype(n)>{}; (i) != (n); ++(i))
#define REP2(i, l, r) for (auto i = (l); (i) != (r); ++(i))
#define rep(...) OVERLOAD_REP(__VA_ARGS__, REP2, REP1)(__VA_ARGS__)
template<class T> bool chmin(T& a, const T& b){if(a > b){a = b; return 1;} return 0;}
template<class T> bool chmax(T& a, const T& b){if(a < b){a = b; return 1;} return 0;}
const ll INF = 1000000000000000000; // 10^18

int main(){
    string s;
    cin >> s;
    if(!(1 <= s.size() && s.size() <= 32)){
        cout << 400 << endl;
        return 0;
    }
    if(s[0] == '-' || s[0] == '_'){
        cout << 400 << endl;
        return 0;
    }
    rep(i,s.size()){
        if(!(((ll)'a' <= (ll)s[i] && (ll)s[i] <= (ll)'z') || ((ll)'A' <= (ll)s[i] && (ll)s[i] <= (ll)'Z') || s[i] == '-' || s[i] == '_')){
            cout << 400 << endl;
            return 0;
        }
    }
    cout << 200 << endl;
    return 0;
}
0