結果

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

ソースコード

diff #
raw source code

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
/*~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
*$* WRITER:kakitamasziru/OxOmisosiru *$*
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=*/
#ifdef LOCAL_JUDGE
#define _GLIBCXX_DEBUG
#endif
#include <stdio.h>
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <iomanip> //setprecision
#include <map> // map
#include <unordered_map> //unordered_map
#include <queue> // queue, priority_queue
#include <set> // set,multiset
#include <stack> // stack
#include <deque> // deque
#include <math.h>//pow,,,
#include <cmath>//abs,,,
#include <bitset> // bitset
#include <numeric> //accumulate,,,
#include <sstream>
#include <initializer_list>
#include <random>
#include <unordered_set>
#include <time.h>
#include <stdio.h>
#include <string.h>
#include <functional>
#include <climits>
#include <utility>
#include <cassert>
#include <fstream>

//#include <atcoder/lazysegtree> // aclibraryを使う際は g++ a.cpp -O2 -std=c++17 -I . でコンパイルする
//using namespace atcoder;
using namespace std;
const long long INF = 4000000000000000001; // 4*10^18
const int inf = 2001001001;
const long long MOD = 998244353;
const long double pi = 3.141592653589;
const vector<int> dh = {1,0,-1,0} , dw = {0,1,0,-1};
const vector<int> dh8 = {-1,-1,-1,0,0,1,1,1} , dw8 = {-1,0,1,-1,1,-1,0,1};
// #define endl "\n";
long long modpow(long long a, long long n, long long mod) {
    a %= mod;
    long long ret = 1;
    while (n > 0) {
        if (n & 1) ret = ret * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return ret % mod;
}
long long modinv(long long a, long long m) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m; 
    if (u < 0) u += m;
    return u;
}
long long gcd(long long a, long long b) {
    if (b == 0) return abs(a); else return gcd(b, a % b);
}
long long lcm(long long a, long long b) {
    return a / gcd(a, b) * b ;
}
long long get_mod(long long res){
    if(res < 0) res += MOD;
    return res % MOD;
}
double DegToRad(double deg){
    return deg*(pi/180.0);
}
double RadToDeg(double rad){
    return rad/(pi/180.0);
}
int uniform_rand(int mini , int maxi){
    random_device seed;
    mt19937_64 engine(seed());
    uniform_real_distribution<> ran(mini , maxi+1);
    int ret = ran(engine);
    if(ret >= maxi+1) ret = maxi;
    return ret;
}

long long xorshift(){
    static long long a = 998244100007; // この a の値を関数実行毎に更新して使いまわすので static で宣言する
    a ^= a << 13;
    a ^= a >> 7;
    a ^= a << 17;
    return a;
}

const string OK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-";

int main() {
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    // FILE* in = freopen("mojain/in1.txt" , "r" , stdin); //2つ以上のケースを試したい場合はファイル名をループ回してin2.txt等で指定していく
    //FILE* out = freopen("mojaout/out1.txt", "w", stdout);
    // ifstream ifs("in.txt"); // 巨大ケースは in.txt に書いてifsで標準入力

    string S;cin >> S;
    if(S.size() < 1 || S.size() > 32){
        cout << "400" << endl;
        return 0;
    }

    if(S.front() == '_' || S.front() == '-' || S.back() == '-' || S.back() == '_'){
        cout << "400" << endl;
        return 0;
    }

    for(int i = 0;i<S.size();i++){
        for(char c : OK){
            if(c == S.at(i)){
                goto SKIP;
            }
        }

        cout << "400" << endl;
        return 0;

        SKIP:;
    }

    cout << "200" << endl;

    return 0;

}
0