QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#184127 | #5671. Programmable Virus | ucup-team1209# | AC ✓ | 1ms | 3560kb | C++20 | 4.1kb | 2023-09-20 13:26:07 | 2023-09-20 13:26:07 |
Judging History
answer
#include<bits/stdc++.h>
using std::cin;
using std::cout;
const std::string INC = "UGC";
const std::string DEC = "UAC";
const std::string IN = "UCC";
const std::string BEGIN = "AGG";
const std::string END = "UGU";
const std::string next = "ACG";
const std::string prev = "UGA";
const std::string OUT = "GCG";
const std::string STOP = "CCC";
const std::string DEBUG = "CAC";
std::string input_cmd() {
std::string res;
res += INC;
res += BEGIN;
res += next;
res += IN;
res += INC;
res += END;
return res;
}
std::string solve5() {
std::string res;
const int N = 20;
for(int i = 0;i < N;++i) {
res += next;
}
res += INC;
for(int i = 0;i < 5;++i) {
res += next;
}
res += INC;
for(int i = 0;i < 5 + N;++i) {
res += prev;
}
res += prev;
res += prev;
res += BEGIN; {
res += DEC;
} res += END;
res += next;
res += DEC;
res += BEGIN; {
res += BEGIN; {
res += next;
} res += END;
res += INC;
res += BEGIN; {
res += prev;
} res += END;
res += next;
res += DEC;
} res += END;
res += next;
res += BEGIN; {
res += next;
} res += END;
for(int i = 0;i < N;++i) {
res += next;
}
res += OUT;
return res;
}
std::string solve4() {
std::string res;
const int N = 40;
for(int i = 0;i < N;++i) {
res += next;
}
for(int i = 0;i < N;++i) {
if(i % 4 == 0) res += INC;
res += next;
}
for(int i = 0;i < N * 2;++i) {
res += prev;
}
res += prev;
res += prev;
res += prev;
res += BEGIN; {
res += DEC;
} res += END;
// res += DEBUG;
for(int id : {2, 1}) {
res += next;
res += DEC;
res += BEGIN; {
for(int inc = 0;inc < id;++inc) {
res += BEGIN; {
res += next;
} res += END;
res += INC;
}
res += BEGIN; {
res += prev;
} res += END;
res += next;
res += DEC;
} res += END;
}
res += next;
res += BEGIN; {
res += next;
} res += END;
for(int i = 0;i < N;++i) {
res += next;
}
res += OUT;
return res;
}
int main() {
std::ios::sync_with_stdio(false), cin.tie(0);
int k;
cin >> k;
if(k == 5) {
cout << input_cmd() + solve5() + STOP << '\n';
return 0;
}
if(k == 4) {
cout << input_cmd() + solve4() + STOP << '\n';
return 0;
}
if(k == 1) {
cout << "UCCAGGUACUGUUGCGCGCCC" << '\n';
return 0;
}
if(k == 2) {
puts("UGCAGGUACACGAGGUACUGUUGAAGGUACACGUGCUGAUGUUCCUGCUGUACGUGCAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGUGUUGUUGUUGUUGUUGUUGUUGUUGUUGUUGAGCGCCC");
return 0;
}
if(k == 3) {
puts(
"UGCAGGACGACGUCCAGGUACACGUGCACGUG"
"CUGAUGAUGUACGACGACGUGCUGAUGCAGGU"
"ACACGAGGUACUGUUGAUGUACGAGGUGAUGA"
"UGAUGCUGAAGGUACACGAGGUACUGUUGAUG"
"UACGGCGCCCUGUUGAUGAAGGUACUGAUGCA"
"CGAGGUACUGAUGCACGAGGUACUGAUACUAC"
"ACGAGGUACUGAUGCACGAGGUACUGAUGCAC"
"GAGGUACUGAUACUACACGAGGUACUGAUGCA"
"CGAGGUACUGAUGCACGAGGUACUGAUACUAC"
"ACGUGUUGUUGUUGUUGUUGUUGUUGUUGUUG"
"AAGGUACUGAUGCACGUGUUGAAGGUACACGU"
"GCUGAAGGUACACGUGCUGAAGGUACACGUAC"
"UACUGAAGGUACACGUGCUGAUGUUGUUGUUG"
"UACGAGGUACUGAUGCACGUGUUGAUGAUGU");
return 0;
}
if(k == 6) {
puts(
"UGCAGGACGACGUCCAGGUACACGUGCACGUG"
"CUGAUGAUGUACGACGACGUGCUGAUGCAGGU"
"ACACGAGGUACUGUUGAUGUACGAGGUGAUGA"
"UGAUGAAGGAGGUACUGUGCGCCCUGUACGAC"
"GACGACGACGACGUGCAGGUACUGAUGCACGA"
"GGUACUGAUACACGAGGUACUGAUGCACGAGG"
"UACUGAUACACGAGGUACUGAUGCACGAGGUA"
"CUGAUACACGAGGUACUGAUGCACGAGGUACU"
"GAUACACGAGGUACUGAUGCACGAGGUACUGA"
"UACACGUGUUGUUGUUGUUGUUGUUGUUGUUG"
"UUGUUGAGCGCCCUGUUGAACGACGAGGUACU"
"GUACGAGGUACUGUUGAUGAUGAUGAAGGUAC"
"ACGACGACGUGCACGUGCUGAUGAUGAUGAUG"
"UACGACGACGAGGUACUGAUGAUGAUGCACGA"
"CGACGUGUUGAUGAUGAAGGUACUGAUGCACG"
"AGGUACUGAUGCACGAGGUACUGAUACUACAC"
"GAGGUACUGAUGCACGAGGUACUGAUGCACGA"
"GGUACUGAUACUACACGAGGUACUGAUGCACG"
"AGGUACUGAUGCACGAGGUACUGAUACUACAC"
"GUGUUGUUGUUGUUGUUGUUGUUGUUGUUGAA"
"GGUACUGAUGCACGUGUUGAAGGUACACGUGC"
"UGAAGGUACACGUGCUGAAGGUACACGUACUA"
"CUGAAGGUACACGUGCUGAUGUUGUUGUUGUA"
"CGAGGUACUGAUGCACGUGUUGAUGAUGU");
return 0;
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3500kb
input:
1
output:
UCCAGGUACUGUUGCGCGCCC
result:
ok correct
Test #2:
score: 0
Accepted
time: 0ms
memory: 3464kb
input:
2
output:
UGCAGGUACACGAGGUACUGUUGAAGGUACACGUGCUGAUGUUCCUGCUGUACGUGCAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGUGUUGUUGUUGUUGUUGUUGUUGUUGUUGUUGAGCGCCC
result:
ok correct
Test #3:
score: 0
Accepted
time: 1ms
memory: 3480kb
input:
3
output:
UGCAGGACGACGUCCAGGUACACGUGCACGUGCUGAUGAUGUACGACGACGUGCUGAUGCAGGUACACGAGGUACUGUUGAUGUACGAGGUGAUGAUGAUGCUGAAGGUACACGAGGUACUGUUGAUGUACGGCGCCCUGUUGAUGAAGGUACUGAUGCACGAGGUACUGAUGCACGAGGUACUGAUACUACACGAGGUACUGAUGCACGAGGUACUGAUGCACGAGGUACUGAUACUACACGAGGUACUGAUGCACGAGGUACUGAUGCACGAGGUACUGAUACUACACGUGUUGUUGU...
result:
ok correct
Test #4:
score: 0
Accepted
time: 0ms
memory: 3472kb
input:
6
output:
UGCAGGACGACGUCCAGGUACACGUGCACGUGCUGAUGAUGUACGACGACGUGCUGAUGCAGGUACACGAGGUACUGUUGAUGUACGAGGUGAUGAUGAUGAAGGAGGUACUGUGCGCCCUGUACGACGACGACGACGACGUGCAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGUGUUGU...
result:
ok correct
Test #5:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
1
output:
UCCAGGUACUGUUGCGCGCCC
result:
ok correct
Test #6:
score: 0
Accepted
time: 0ms
memory: 3472kb
input:
2
output:
UGCAGGUACACGAGGUACUGUUGAAGGUACACGUGCUGAUGUUCCUGCUGUACGUGCAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGUGUUGUUGUUGUUGUUGUUGUUGUUGUUGUUGAGCGCCC
result:
ok correct
Test #7:
score: 0
Accepted
time: 1ms
memory: 3552kb
input:
3
output:
UGCAGGACGACGUCCAGGUACACGUGCACGUGCUGAUGAUGUACGACGACGUGCUGAUGCAGGUACACGAGGUACUGUUGAUGUACGAGGUGAUGAUGAUGCUGAAGGUACACGAGGUACUGUUGAUGUACGGCGCCCUGUUGAUGAAGGUACUGAUGCACGAGGUACUGAUGCACGAGGUACUGAUACUACACGAGGUACUGAUGCACGAGGUACUGAUGCACGAGGUACUGAUACUACACGAGGUACUGAUGCACGAGGUACUGAUGCACGAGGUACUGAUACUACACGUGUUGUUGU...
result:
ok correct
Test #8:
score: 0
Accepted
time: 0ms
memory: 3484kb
input:
4
output:
UGCAGGACGUCCUGCUGUACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGUGCACGACGACGACGUGCACGACGACGACGUGCACGACGACGACGUGCACGACGACGACGUGCACGACGACGACGUGCACGACGACGACGUGCACGACGACGACGUGCACGACGACGACGUGCACGACGACGACGUGCACGACGACGACGUGAUGAUGAUGA...
result:
ok correct
Test #9:
score: 0
Accepted
time: 1ms
memory: 3484kb
input:
5
output:
UGCAGGACGUCCUGCUGUACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGUGCACGACGACGACGACGUGCUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAUGAAGGUACUGUACGUACAGGAGGACGUGUUGCAGGUGAUGUACGUACUGUACGAGGACGUGUACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACG...
result:
ok correct
Test #10:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
6
output:
UGCAGGACGACGUCCAGGUACACGUGCACGUGCUGAUGAUGUACGACGACGUGCUGAUGCAGGUACACGAGGUACUGUUGAUGUACGAGGUGAUGAUGAUGAAGGAGGUACUGUGCGCCCUGUACGACGACGACGACGACGUGCAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGAGGUACUGAUGCACGAGGUACUGAUACACGUGUUGU...
result:
ok correct