結果
| 問題 | No.3497 Sign up for traP |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-18 11:36:55 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 696 bytes |
| 記録 | |
| コンパイル時間 | 3,387 ms |
| コンパイル使用メモリ | 331,444 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-18 11:37:02 |
| 合計ジャッジ時間 | 3,758 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define long long ll
bool isOK(char c) {
bool r = false;
if ('A' <= c && c <= 'Z')
r = true;
if ('a' <= c && c <= 'z')
r = true;
if ('0' <= c && c <= '9')
r = true;
if (c == '_' || c == '-')
r = true;
return (r);
}
int main(void) {
string S;
cin >> S;
for (char c : S) {
if (!isOK(c)) {
cout << 400 << endl;
return (0);
}
}
char S_head = S[0];
if (S_head == '-' || S_head == '_') {
cout << 400 << endl;
return (0);
}
char S_tail = S[S.length() - 1];
if (S_tail == '-' || S_tail == '_') {
cout << 400 << endl;
return (0);
}
cout << 200 << endl;
return (0);
}