結果
| 問題 | No.701 ひとりしりとり |
| コンテスト | |
| ユーザー |
dnish
|
| 提出日時 | 2018-06-15 22:40:55 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 124 ms / 2,000 ms |
| コード長 | 609 bytes |
| コンパイル時間 | 1,629 ms |
| コンパイル使用メモリ | 169,796 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-30 15:09:21 |
| 合計ジャッジ時間 | 2,241 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
#include "bits/stdc++.h"
#define REP(i,n,N) for(ll i=(n); i<(N); i++)
#define RREP(i,n,N) for(ll i=(N-1); i>=n; i--)
#define CK(n,a,b) (a)<=(n)&&(n)<(b)
#define ALL(v) (v).begin(),(v).end()
#define p(s) cout<<(s)<<endl
typedef long long ll;
using namespace std;
const ll inf =1e18;
int n;
int main(){
while(cin>>n){
cin>>n;
string s="bcdefghijklmnopqrs";
do{
if(n==1){
cout<<'a'<<s<<'n'<<endl;
break;
}
cout<<'a'<<s<<'a'<<endl;
n--;
}while(next_permutation(ALL(s)));
}
return 0;
}
dnish