結果
問題 | No.701 ひとりしりとり |
ユーザー |
![]() |
提出日時 | 2018-07-17 19:29:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 126 ms / 2,000 ms |
コード長 | 1,047 bytes |
コンパイル時間 | 827 ms |
コンパイル使用メモリ | 92,912 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-26 07:58:34 |
合計ジャッジ時間 | 1,985 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
#include <stdio.h> #include <algorithm> #include <iostream> #include <string> #include <vector> #include <functional> #include <map> #include <iomanip> #include <math.h> #include <stack> #include <queue> #include <bitset> #include <cstdlib> #include <tuple> #include <cctype> using namespace std; int main() { int i, j, k; int n; //vector<string>s(100000, "aaaaaaaaaaaaaaaaaaaa"); int ke[20] = { 0 }; cin >> n; int iti = 1, cnt = 0, cnt2 = 0, amari, keta = 0; for (i = 1; i <= n; i++) { //keta = 0; for (j = i; j <= i; j++) { ke[keta]++; bool flag = false; while (ke[keta]==25) { ke[keta + 1]++; ke[keta] = 0; keta++; flag = true; } if (flag == true) { keta = 0; } } cout << "a"; for (int j = 0; j < 7; j++) { //cout << setw(3) << ke[i] << " "; cout << (char)( 97 + ke[j]) ; } if (i == n) { cout << "n"; } else { cout << "a"; } cout << endl; //for (int i = 0; i < 7; i++) { // ke[i] = 0; //} } getchar(); getchar(); return 0; }