結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-15 07:06:50 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 504 bytes |
| コンパイル時間 | 601 ms |
| コンパイル使用メモリ | 66,560 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-30 14:42:13 |
| 合計ジャッジ時間 | 1,270 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 WA * 2 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main()
| ^~~~
ソースコード
#include<iostream>
using namespace std;
string s;
main()
{
cin>>s;
int start=0;
while(start<s.size()&&s.substr(start,3)=="w")start+=3;
for(int k=s.size();k>0;k-=3)
{
bool f=0;
for(int i=start;i+k<=s.size();i+=3)
{
bool l=1;
for(int j=0;j<k/3;j++)
{
l&=s.substr(i+j*3,3)=="w";
}
if(l)
{
f=1;
int first=i;
i-=3;
while(i>=0&&s.substr(i,3)!="w")i-=3;
cout<<s.substr(i+3,first-i-3)<<endl;
i=first;
}
}
if(f)return 0;
}
cout<<""<<endl;
}