QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#759496 | #9354. Justifying the Conjecture | 275307894a# | AC ✓ | 17ms | 3988kb | C++14 | 1.2kb | 2024-11-18 09:16:18 | 2024-11-18 09:16:18 |
Judging History
answer
#include<bits/stdc++.h>
#define Gc() getchar()
#define Me(x,y) memset(x,y,sizeof(x))
#define Mc(x,y) memcpy(x,y,sizeof(x))
#define d(x,y) ((m)*(x-1)+(y))
#define R(n) (rnd()%(n)+1)
#define Pc(x) putchar(x)
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define eb emplace_back
#define all(x) x.begin(),x.end()
using namespace std;using ll=long long;using db=double;using lb=long db;using ui=unsigned;using ull=unsigned long long;using pii=pair<int,int>;
const int N=1e6+5,M=N*4+5,K=1000+5,mod=1e9+7,Mod=mod-1;const db eps=1e-9;const int INF=1e9+7;mt19937 rnd(28382);
#define Tp template<typename T>
#define Ts template<typename T,typename... Ar>
namespace Debug{
Tp void _debug(char* f,T t){cerr<<f<<'='<<t<<endl;}
Ts void _debug(char* f,T x,Ar... y){while(*f!=',') cerr<<*f++;cerr<<'='<<x<<",";_debug(f+1,y...);}
#ifdef LOCAL
#define gdb(...) _debug((char*)#__VA_ARGS__,__VA_ARGS__)
#else
#define gdb(...) void()
#endif
}using namespace Debug;
int n;
void Solve(){
scanf("%d",&n);
if(n<=5){
puts("-1");
}else if(n&1){
printf("%d %d\n",3,n-3);
}else printf("%d %d\n",2,n-2);
}
int main(){
int t=1;
scanf("%d",&t);
while(t--) Solve();
cerr<<clock()*1.0/CLOCKS_PER_SEC<<'\n';
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3984kb
input:
3 4 6 7
output:
-1 2 4 3 4
result:
ok ok
Test #2:
score: 0
Accepted
time: 17ms
memory: 3988kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 8...
output:
-1 -1 -1 -1 -1 2 4 3 4 2 6 3 6 2 8 3 8 2 10 3 10 2 12 3 12 2 14 3 14 2 16 3 16 2 18 3 18 2 20 3 20 2 22 3 22 2 24 3 24 2 26 3 26 2 28 3 28 2 30 3 30 2 32 3 32 2 34 3 34 2 36 3 36 2 38 3 38 2 40 3 40 2 42 3 42 2 44 3 44 2 46 3 46 2 48 3 48 2 50 3 50 2 52 3 52 2 54 3 54 2 56 3 56 2 58 3 58 2 60 3 60 2...
result:
ok ok
Test #3:
score: 0
Accepted
time: 12ms
memory: 3844kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 4...
output:
-1 -1 -1 -1 -1 2 4 3 4 2 6 3 6 2 8 3 8 2 10 3 10 2 12 3 12 2 14 3 14 2 16 3 16 2 18 3 18 2 20 3 20 2 22 3 22 2 24 3 24 2 26 3 26 2 28 3 28 2 30 3 30 2 32 3 32 2 34 3 34 2 36 3 36 2 38 3 38 2 40 3 40 2 42 3 42 2 44 3 44 2 46 3 46 2 48 3 48 2 50 3 50 2 52 3 52 2 54 3 54 2 56 3 56 2 58 3 58 2 60 3 60 2...
result:
ok ok
Test #4:
score: 0
Accepted
time: 12ms
memory: 3980kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 6...
output:
-1 -1 -1 -1 -1 2 4 3 4 2 6 3 6 2 8 3 8 2 10 3 10 2 12 3 12 2 14 3 14 2 16 3 16 2 18 3 18 2 20 3 20 2 22 3 22 2 24 3 24 2 26 3 26 2 28 3 28 2 30 3 30 2 32 3 32 2 34 3 34 2 36 3 36 2 38 3 38 2 40 3 40 2 42 3 42 2 44 3 44 2 46 3 46 2 48 3 48 2 50 3 50 2 52 3 52 2 54 3 54 2 56 3 56 2 58 3 58 2 60 3 60 2...
result:
ok ok
Test #5:
score: 0
Accepted
time: 12ms
memory: 3840kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
-1 -1 -1 -1 -1 2 4 3 4 2 6 3 6 2 8 3 8 2 10 3 10 2 12 3 12 2 14 3 14 2 16 3 16 2 18 3 18 2 20 3 20 2 22 3 22 2 24 3 24 2 26 3 26 2 28 3 28 2 30 3 30 2 32 3 32 2 34 3 34 2 36 3 36 2 38 3 38 2 40 3 40 2 42 3 42 2 44 3 44 2 46 3 46 2 48 3 48 2 50 3 50 2 52 3 52 2 54 3 54 2 56 3 56 2 58 3 58 2 60 3 60 2...
result:
ok ok
Test #6:
score: 0
Accepted
time: 0ms
memory: 3944kb
input:
40 1 2 3 4 5 6 7 8 9 10 70001 6455 86825 26169 72400 42488 40355 53919 16396 54363 90208 32113 58385 69368 40752 88337 37427 45794 30882 68127 24500 17571 259 6475 19479 87423 4169 99595 19687 29672
output:
-1 -1 -1 -1 -1 2 4 3 4 2 6 3 6 2 8 3 69998 3 6452 3 86822 3 26166 2 72398 2 42486 3 40352 3 53916 2 16394 3 54360 2 90206 3 32110 3 58382 2 69366 2 40750 3 88334 3 37424 2 45792 2 30880 3 68124 2 24498 3 17568 3 256 3 6472 3 19476 3 87420 3 4166 3 99592 3 19684 2 29670
result:
ok ok
Extra Test:
score: 0
Extra Test Passed