結果
| 問題 |
No.701 ひとりしりとり
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-18 05:28:28 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 329 bytes |
| コンパイル時間 | 602 ms |
| コンパイル使用メモリ | 67,676 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 16:47:10 |
| 合計ジャッジ時間 | 1,646 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 1 |
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main()
| ^~~~
ソースコード
#include<iostream>
using namespace std;
string s[99];
int n;
main()
{
cin>>n;
for(int i=0;i<10;i++)s[i]=char(i+'a')+string(4,'a');
int now=0;
for(int i=0;i<n;i++)
{
cout<<s[now]<<(i==n-1?"n":"")<<endl;
int next=s[now][4]-'a';
s[now][4]++;
int j=4;
while(s[now][j]>'j')s[now][j]='a',s[now][--j]++;
now=next;
}
}