結果
| 問題 | No.3497 Sign up for traP |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-18 23:08:51 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 646 bytes |
| 記録 | |
| コンパイル時間 | 1,397 ms |
| コンパイル使用メモリ | 148,460 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-18 23:22:28 |
| 合計ジャッジ時間 | 7,476 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 4 |
ソースコード
#include <iostream>
#include <cctype>
using namespace std;
int main(void){
string S;
int count=0;
cin>>S;
int len=S.length();
string reg;
reg="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";
int l_r=reg.length();
for(int i=0;i<len;i++){
if (isspace(S[i])) {
count++;
}
if(i>=32){
count++;
}
if(count>0){
printf("400");
break;
}
for(int j=0;j<l_r;j++){
if(i==0||i==len-1){
if((S[i]=='_')||(S[i]=='-')){
count++;
break;
}
}
if(S[i]==reg[j]){
break;
}
if(S[i]!=reg[j]&&j==l_r-1){
count++;
}
}
if(i==len-1&&count==0){
printf("200");
}
}
}