QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#33767 | #4237. Word Ladder | Qingyu | AC ✓ | 10ms | 3816kb | C++23 | 1.2kb | 2022-06-05 01:04:24 | 2022-06-05 01:04:26 |
Judging History
answer
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <sstream>
#include <complex>
#include <ctime>
#include <cassert>
#include <functional>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef pair<int,int> PII;
#define REP(i,s,t) for(int i=(s);i<(t);i++)
#define FILL(x,v) memset(x,v,sizeof(x))
const int INF = (int)1E9;
#define MAXN 5000
char chr(int x) {
return 'a' + x;
}
string str(int a, int b, VI &chs) {
string res = "";
res += chr(a);
res += chr(b);
for (auto &c: chs) res += chr(c);
return res;
}
int main() {
int a = 0, b = 0;
VI chs(8, 25);
vector<string> res;
res.push_back(str(a, b, chs));
REP(cl,0,26) {
REP(cr,0,25) {
REP(i,0,8) {
chs[i] = (chs[i] + 1) % 26;
res.push_back(str(a, b, chs));
}
}
b = (b + 1) % 26;
res.push_back(str(a, b, chs));
a = (a + 1) % 26;
res.push_back(str(a, b, chs));
}
int n;
cin >> n;
REP(i,0,n) cout << res[i] << endl;
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 3ms
memory: 3784kb
input:
5
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz
result:
ok good solution
Test #2:
score: 0
Accepted
time: 3ms
memory: 3664kb
input:
3
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz
result:
ok good solution
Test #3:
score: 0
Accepted
time: 3ms
memory: 3736kb
input:
4
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz
result:
ok good solution
Test #4:
score: 0
Accepted
time: 2ms
memory: 3736kb
input:
6
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz
result:
ok good solution
Test #5:
score: 0
Accepted
time: 2ms
memory: 3816kb
input:
7
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz
result:
ok good solution
Test #6:
score: 0
Accepted
time: 3ms
memory: 3632kb
input:
8
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz
result:
ok good solution
Test #7:
score: 0
Accepted
time: 3ms
memory: 3764kb
input:
9
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa
result:
ok good solution
Test #8:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
10
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa
result:
ok good solution
Test #9:
score: 0
Accepted
time: 4ms
memory: 3736kb
input:
64
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution
Test #10:
score: 0
Accepted
time: 4ms
memory: 3708kb
input:
51
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution
Test #11:
score: 0
Accepted
time: 1ms
memory: 3748kb
input:
97
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution
Test #12:
score: 0
Accepted
time: 4ms
memory: 3596kb
input:
100
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution
Test #13:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
1000
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution
Test #14:
score: 0
Accepted
time: 5ms
memory: 3664kb
input:
1001
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution
Test #15:
score: 0
Accepted
time: 6ms
memory: 3804kb
input:
1024
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution
Test #16:
score: 0
Accepted
time: 5ms
memory: 3656kb
input:
1025
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution
Test #17:
score: 0
Accepted
time: 5ms
memory: 3712kb
input:
5000
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution
Test #18:
score: 0
Accepted
time: 10ms
memory: 3712kb
input:
4999
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution
Test #19:
score: 0
Accepted
time: 10ms
memory: 3732kb
input:
4096
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution
Test #20:
score: 0
Accepted
time: 6ms
memory: 3628kb
input:
4097
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution
Test #21:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
4098
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution
Test #22:
score: 0
Accepted
time: 10ms
memory: 3812kb
input:
3751
output:
aazzzzzzzz aaazzzzzzz aaaazzzzzz aaaaazzzzz aaaaaazzzz aaaaaaazzz aaaaaaaazz aaaaaaaaaz aaaaaaaaaa aabaaaaaaa aabbaaaaaa aabbbaaaaa aabbbbaaaa aabbbbbaaa aabbbbbbaa aabbbbbbba aabbbbbbbb aacbbbbbbb aaccbbbbbb aacccbbbbb aaccccbbbb aacccccbbb aaccccccbb aacccccccb aacccccccc aadccccccc aaddcccccc aad...
result:
ok good solution