結果
| 問題 |
No.203 ゴールデン・ウィーク(1)
|
| コンテスト | |
| ユーザー |
startcpp
|
| 提出日時 | 2015-05-08 23:26:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 563 bytes |
| コンパイル時間 | 533 ms |
| コンパイル使用メモリ | 73,432 KB |
| 最終ジャッジ日時 | 2024-11-14 19:03:04 |
| 合計ジャッジ時間 | 1,147 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:27:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
27 | if(strstr(str, maru) != '\0') {
| ~~~~~~~~~~~~~~~~~~^~~~~~~
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
using namespace std;
char buf[8], str[15];
int main() {
cin >> buf;
strcpy(str, buf);
cin >> buf;
strcat(str, buf);
for(int i = 14; i > 0; i--) {
char maru[15];
for(int j = 0; j < i; j++) maru[j] = 'o';
maru[i] = '\0';
if(strstr(str, maru) != '\0') {
cout << i << endl;
return 0;
}
}
cout << 0 << endl;
return 0;
}
startcpp