結果
| 問題 | No.3497 Sign up for traP |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-09 20:07:28 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 680 bytes |
| 記録 | |
| コンパイル時間 | 3,252 ms |
| コンパイル使用メモリ | 330,552 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-09 20:07:33 |
| 合計ジャッジ時間 | 3,332 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main()
{
auto is_valid = [](const string &s)
{
if (s.length() <= 0 || s.length() > 32) return false;
for (char c : s)
{
if (c >= 'a' && c <= 'z') continue;
if (c >= 'A' && c <= 'Z') continue;
if (c >= '0' && c <= '9') continue;
if (c == '-' || c == '_') continue;
return false;
}
if (s[0] == '-' || s[0] == '_') return false;
if (s.back() == '-' || s.back() == '_') return false;
return true;
};
string s;
cin >> s;
if (is_valid(s)) cout << "200" << "\n";
else cout << "400" << "\n";
}