結果
| 問題 | No.701 ひとりしりとり | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-06-16 14:11:27 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 560 bytes | 
| コンパイル時間 | 1,297 ms | 
| コンパイル使用メモリ | 160,684 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-06-30 16:14:12 | 
| 合計ジャッジ時間 | 3,873 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 12 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef  long long int ll;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; i++)
#define rep(i, n) FOR(i, 0, n)
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    string s = "abcdefghijklmnopq";
    int count = 0;
    do{
        count++;
        cout << "a" << s;
        if (count < n)
            cout << "a" << endl;
        else {
            cout << "z" << endl;
            break;
        }
     } while(next_permutation(s.begin(), s.end()));
    return 0;
}
            
            
            
        