#include "dna.h"
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <utility>
#include <queue>
#include <map>
#include <iomanip>
#include <fstream>
#include <cstdlib>
using namespace std;
std::string analyse(int n, int t) {
if(n==1){
vector<int>d={0,1};
for(int i=0;i<d.size();i++){
if(make_test(to_string(d[i]))){
return to_string(d[i]);
break;
}
}
}
else if(n==2){
vector<int>d={00,01,10,11};
for(int i=0;i<d.size();i++){
if(make_test(to_string(d[i]))){
return to_string(d[i]);
break;
}
}
}
else if(n==3){
vector<int>d={000,001,010,011,100,101,110,111};
for(int i=0;i<d.size();i++){
if(make_test(to_string(d[i]))){
return to_string(d[i]);
break;
}
}
}
else if(n==4){
vector<int>d={0000,0001,0010,0011,0100,0101,0110,0111,1000,1001,1010,1011,1100,1101,1110,1111};
for(int i=0;i<d.size();i++){
if(make_test(to_string(d[i]))){
return to_string(d[i]);
break;
}
}
}
else if(n==5){
vector<int>d={00000,00001,00010,00011,00100,00101,00110,00111,01000,01001,01010,01011,01100,01101,01110,01111,10000,10001,10010,10011,10100,10101,10110,10111,11000,11001,11010,11011,11100,11101,11110,11111};
for(int i=0;i<d.size();i++){
if(make_test(to_string(d[i]))){
return to_string(d[i]);
break;
}
}
}
}
Compilation message
dna.cpp: In function 'std::string analyse(int, int)':
dna.cpp:19:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
19 | for(int i=0;i<d.size();i++){
| ~^~~~~~~~~
dna.cpp:28:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
28 | for(int i=0;i<d.size();i++){
| ~^~~~~~~~~
dna.cpp:37:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
37 | for(int i=0;i<d.size();i++){
| ~^~~~~~~~~
dna.cpp:46:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
46 | for(int i=0;i<d.size();i++){
| ~^~~~~~~~~
dna.cpp:55:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
55 | for(int i=0;i<d.size();i++){
| ~^~~~~~~~~
dna.cpp:63:1: warning: control reaches end of non-void function [-Wreturn-type]
63 | }
| ^
grader.cpp: In function 'bool make_test(std::string)':
grader.cpp:14:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
14 | for (int i = 0; i < p.size(); i++) {
| ~~^~~~~~~~~~
grader.cpp:23:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
23 | for (int i = 1; i <= ss.size(); i++) {
| ~~^~~~~~~~~~~~
grader.cpp:28:13: warning: comparison of integer expressions of different signedness: '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
28 | if (pr[i] == p.size()) {
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
4 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
5 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
6 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
7 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
8 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
9 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
10 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
11 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
12 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
13 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
14 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
15 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
16 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
17 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
18 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
19 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
20 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
21 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
22 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
23 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
24 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
4 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
5 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
6 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
7 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
8 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
9 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
10 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
11 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
12 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
13 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
14 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
15 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
16 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
17 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
18 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
19 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
20 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
21 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
22 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
23 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
24 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
25 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
26 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
27 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
28 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
29 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
30 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
31 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
32 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
33 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
34 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
4 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
5 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
6 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
7 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
8 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
9 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
10 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
11 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
12 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
13 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
14 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
15 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
16 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
17 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
18 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
19 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
20 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
21 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
22 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
23 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
24 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
25 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
26 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
27 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
28 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
29 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
30 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
31 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
32 |
Incorrect |
1 ms |
208 KB |
Wrong DNA |
33 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
34 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
35 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
36 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
37 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
38 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |
39 |
Incorrect |
1 ms |
204 KB |
Wrong DNA |