結果
問題 | No.701 ひとりしりとり |
ユーザー |
![]() |
提出日時 | 2018-06-15 22:32:43 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 431 bytes |
コンパイル時間 | 1,640 ms |
コンパイル使用メモリ | 170,840 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-30 15:03:19 |
合計ジャッジ時間 | 3,675 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 12 |
ソースコード
#include <bits/stdc++.h>using namespace std;int n; int cnt;vector<int> v;void s(int t) {if (cnt == n) return;if (t == 5) {for (int i = 0; i < 6; i++) {printf("%c", 'a'+v[i]);}printf("\n");cnt++;return;}for (int i = 0; i < 26; i++) {v[t] = i;s(t+1);}return;}int main(){cin >> n;v.resize(6, 0);s(1);if (cnt != n) cout << "false" << endl;return 0;}