# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
168421 | 2019-12-13T03:43:16 Z | abil | Nice sequence (IZhO18_sequence) | C++14 | 3 ms | 384 KB |
#include <bits/stdc++.h> #define fr first #define sc second #define pb push_bacak #define mk make_pair #define all(s) s.begin(),s.end() //#define int long long using namespace std; const int N = (1e6 + 12); const int mod = (1e9 + 7); const int INF = (0x3f3f3f3f); void solve(){ int n, m; scanf("%d%d", &n, &m); if(max(n, m) % min(n, m) == 0){ int x = 1; if(m > n){ x = -1; } printf("%d\n", max(n, m) - 1); for(int i = 1;i <= max(n, m) - 1; i++){ printf("%d ", x); } printf("\n"); } } main() { int t; cin >> t; while(t--){ solve(); } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 384 KB | Ok |
2 | Correct | 2 ms | 256 KB | Ok |
3 | Correct | 2 ms | 256 KB | Ok |
4 | Correct | 2 ms | 376 KB | Ok |
5 | Correct | 2 ms | 376 KB | Ok |
6 | Correct | 2 ms | 376 KB | Ok |
7 | Correct | 2 ms | 256 KB | Ok |
8 | Correct | 3 ms | 256 KB | Ok |
9 | Correct | 2 ms | 376 KB | Ok |
10 | Correct | 2 ms | 380 KB | Ok |
11 | Correct | 2 ms | 376 KB | Ok |
12 | Correct | 2 ms | 376 KB | Ok |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | there is incorrect sequence |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Jury has the better answer : jans = 3, pans = 0 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | there is incorrect sequence |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 384 KB | Ok |
2 | Correct | 2 ms | 256 KB | Ok |
3 | Correct | 2 ms | 256 KB | Ok |
4 | Correct | 2 ms | 376 KB | Ok |
5 | Correct | 2 ms | 376 KB | Ok |
6 | Correct | 2 ms | 376 KB | Ok |
7 | Correct | 2 ms | 256 KB | Ok |
8 | Correct | 3 ms | 256 KB | Ok |
9 | Correct | 2 ms | 376 KB | Ok |
10 | Correct | 2 ms | 380 KB | Ok |
11 | Correct | 2 ms | 376 KB | Ok |
12 | Correct | 2 ms | 376 KB | Ok |
13 | Incorrect | 2 ms | 376 KB | Jury has the better answer : jans = 3, pans = 0 |
14 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 384 KB | Ok |
2 | Correct | 2 ms | 256 KB | Ok |
3 | Correct | 2 ms | 256 KB | Ok |
4 | Correct | 2 ms | 376 KB | Ok |
5 | Correct | 2 ms | 376 KB | Ok |
6 | Correct | 2 ms | 376 KB | Ok |
7 | Correct | 2 ms | 256 KB | Ok |
8 | Correct | 3 ms | 256 KB | Ok |
9 | Correct | 2 ms | 376 KB | Ok |
10 | Correct | 2 ms | 380 KB | Ok |
11 | Correct | 2 ms | 376 KB | Ok |
12 | Correct | 2 ms | 376 KB | Ok |
13 | Incorrect | 2 ms | 256 KB | there is incorrect sequence |
14 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 384 KB | Ok |
2 | Correct | 2 ms | 256 KB | Ok |
3 | Correct | 2 ms | 256 KB | Ok |
4 | Correct | 2 ms | 376 KB | Ok |
5 | Correct | 2 ms | 376 KB | Ok |
6 | Correct | 2 ms | 376 KB | Ok |
7 | Correct | 2 ms | 256 KB | Ok |
8 | Correct | 3 ms | 256 KB | Ok |
9 | Correct | 2 ms | 376 KB | Ok |
10 | Correct | 2 ms | 380 KB | Ok |
11 | Correct | 2 ms | 376 KB | Ok |
12 | Correct | 2 ms | 376 KB | Ok |
13 | Incorrect | 2 ms | 256 KB | there is incorrect sequence |
14 | Halted | 0 ms | 0 KB | - |