結果
| 問題 |
No.701 ひとりしりとり
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-18 05:27:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 329 bytes |
| コンパイル時間 | 554 ms |
| コンパイル使用メモリ | 66,964 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 16:46:38 |
| 合計ジャッジ時間 | 3,411 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 RE * 9 |
コンパイルメッセージ
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]>'z')s[now][j]='a',s[now][--j]++;
now=next;
}
}