QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#33293#4237. Word Ladderflower_and_qingyu#AC ✓3ms3704kbC++23453b2022-05-31 09:57:342022-05-31 09:57:36

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-05-31 09:57:36]
  • 评测
  • 测评结果:AC
  • 用时:3ms
  • 内存:3704kb
  • [2022-05-31 09:57:34]
  • 提交

answer

#include <bits/stdc++.h>

std::mt19937 s(1);

inline int rnd(int l, int r) {
	return std::uniform_int_distribution<int>(l, r)(s);
}

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(nullptr);
	std::cout.tie(nullptr);
	int n;
	std::cin >> n;
	std::string s(10, 'a');
	for (int i = 0; i < n; ++i) {
		std::cout << s << '\n';
		char ch;
		do {
			ch = rnd('a', 'z');
		} while (ch == s[i % 10]);
		s[i % 10] = ch;
	}
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 3ms
memory: 3556kb

input:

5

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa

result:

ok good solution

Test #2:

score: 0
Accepted
time: 2ms
memory: 3544kb

input:

3

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa

result:

ok good solution

Test #3:

score: 0
Accepted
time: 2ms
memory: 3624kb

input:

4

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa

result:

ok good solution

Test #4:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

6

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa

result:

ok good solution

Test #5:

score: 0
Accepted
time: 2ms
memory: 3552kb

input:

7

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa

result:

ok good solution

Test #6:

score: 0
Accepted
time: 2ms
memory: 3652kb

input:

8

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa

result:

ok good solution

Test #7:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

9

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa

result:

ok good solution

Test #8:

score: 0
Accepted
time: 2ms
memory: 3548kb

input:

10

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga

result:

ok good solution

Test #9:

score: 0
Accepted
time: 2ms
memory: 3624kb

input:

64

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution

Test #10:

score: 0
Accepted
time: 2ms
memory: 3628kb

input:

51

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution

Test #11:

score: 0
Accepted
time: 2ms
memory: 3628kb

input:

97

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution

Test #12:

score: 0
Accepted
time: 2ms
memory: 3536kb

input:

100

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution

Test #13:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

1000

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution

Test #14:

score: 0
Accepted
time: 2ms
memory: 3536kb

input:

1001

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution

Test #15:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

1024

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution

Test #16:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

1025

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution

Test #17:

score: 0
Accepted
time: 2ms
memory: 3660kb

input:

5000

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution

Test #18:

score: 0
Accepted
time: 3ms
memory: 3604kb

input:

4999

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution

Test #19:

score: 0
Accepted
time: 3ms
memory: 3624kb

input:

4096

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution

Test #20:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

4097

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution

Test #21:

score: 0
Accepted
time: 3ms
memory: 3552kb

input:

4098

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution

Test #22:

score: 0
Accepted
time: 1ms
memory: 3552kb

input:

3751

output:

aaaaaaaaaa
kaaaaaaaaa
kzaaaaaaaa
kzsaaaaaaa
kzsyaaaaaa
kzsydaaaaa
kzsydhaaaa
kzsydhzaaa
kzsydhzdaa
kzsydhzdga
kzsydhzdgc
ezsydhzdgc
eksydhzdgc
ekiydhzdgc
ekirdhzdgc
ekirkhzdgc
ekirkyzdgc
ekirkyodgc
ekirkyowgc
ekirkyowkc
ekirkyowki
rkirkyowki
rnirkyowki
rnfrkyowki
rnflkyowki
rnflwyowki
rnflwfowki
rnf...

result:

ok good solution