結果
| 問題 |
No.908 うしたぷにきあくん文字列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-10-30 21:33:29 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 675 bytes |
| コンパイル時間 | 504 ms |
| コンパイル使用メモリ | 64,636 KB |
| 実行使用メモリ | 6,940 KB |
| 最終ジャッジ日時 | 2024-09-14 21:58:16 |
| 合計ジャッジ時間 | 1,246 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 WA * 1 |
ソースコード
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int Gets(char *buff,int buffMaxSize)
{
buff[0]='\0';
if (fgets(buff,buffMaxSize,stdin)==NULL){
return -1;
}
size_t strLen = strlen(buff);
if (strLen>0){
while (buff[strLen-1] == '\r' || buff[strLen-1]=='\n'){//改行コード
strLen--;
buff[strLen]='\0';
}
}
return (int)strLen;
}
int main(int argc, char* argv[])
{
char S[101];
Gets(S,100);
size_t Len=strlen(S);
for (int i=0;i<Len;i++){
if (i%2==1){
if (S[i]!=' '){
cout<<"No"<<endl;
return 0;
}
}else{
if (S[i]==' '){
cout<<"No"<<endl;
return 0;
}
}
}
cout<<"Yes"<<endl;
return 0;
}