結果
| 問題 | No.701 ひとりしりとり | 
| コンテスト | |
| ユーザー |  aaa | 
| 提出日時 | 2018-07-17 19:22:15 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 1,041 bytes | 
| コンパイル時間 | 1,109 ms | 
| コンパイル使用メモリ | 92,948 KB | 
| 実行使用メモリ | 10,496 KB | 
| 最終ジャッジ日時 | 2024-11-26 07:34:29 | 
| 合計ジャッジ時間 | 4,865 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 11 TLE * 1 | 
ソースコード
#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 = 1; 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 < 10; 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 < 10; i++) {
			ke[i] = 0;
		}
	}
	getchar();
	getchar();
	return 0;
}
            
            
            
        