# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
344982 | 2021-01-06T20:39:35 Z | kkk | Nice sequence (IZhO18_sequence) | C++14 | 1 ms | 384 KB |
#include<iostream> #include<cstring> #define endl '\n' using namespace std; long long a[100003],d[100003],used[5002]; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); long long n,l,r,i,j,t,m; cin>>t; for(i=0;i<t;i++) { cin>>n>>m; if(n>m) { cout<<n-1<<endl; if(n-1!=0){ for(j=1;j<n-1;j++)cout<<j<<" ";cout<<n-1<<endl;} } else { cout<<m-1<<endl; if(m-1!=0){ for(j=1;j<m-1;j++)cout<<-j<<" ";cout<<-m+1<<endl;} } } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Ok |
2 | Correct | 1 ms | 364 KB | Ok |
3 | Correct | 1 ms | 364 KB | Ok |
4 | Correct | 1 ms | 364 KB | Ok |
5 | Correct | 1 ms | 364 KB | Ok |
6 | Correct | 1 ms | 364 KB | Ok |
7 | Correct | 1 ms | 364 KB | Ok |
8 | Correct | 1 ms | 364 KB | Ok |
9 | Correct | 1 ms | 364 KB | Ok |
10 | Correct | 1 ms | 364 KB | Ok |
11 | Correct | 1 ms | 384 KB | Ok |
12 | Correct | 1 ms | 364 KB | Ok |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | Jury has the better answer : jans = 3, pans = 2 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | Jury has the better answer : jans = 3, pans = 2 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | Jury has the better answer : jans = 3, pans = 2 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Ok |
2 | Correct | 1 ms | 364 KB | Ok |
3 | Correct | 1 ms | 364 KB | Ok |
4 | Correct | 1 ms | 364 KB | Ok |
5 | Correct | 1 ms | 364 KB | Ok |
6 | Correct | 1 ms | 364 KB | Ok |
7 | Correct | 1 ms | 364 KB | Ok |
8 | Correct | 1 ms | 364 KB | Ok |
9 | Correct | 1 ms | 364 KB | Ok |
10 | Correct | 1 ms | 364 KB | Ok |
11 | Correct | 1 ms | 384 KB | Ok |
12 | Correct | 1 ms | 364 KB | Ok |
13 | Incorrect | 1 ms | 364 KB | Jury has the better answer : jans = 3, pans = 2 |
14 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Ok |
2 | Correct | 1 ms | 364 KB | Ok |
3 | Correct | 1 ms | 364 KB | Ok |
4 | Correct | 1 ms | 364 KB | Ok |
5 | Correct | 1 ms | 364 KB | Ok |
6 | Correct | 1 ms | 364 KB | Ok |
7 | Correct | 1 ms | 364 KB | Ok |
8 | Correct | 1 ms | 364 KB | Ok |
9 | Correct | 1 ms | 364 KB | Ok |
10 | Correct | 1 ms | 364 KB | Ok |
11 | Correct | 1 ms | 384 KB | Ok |
12 | Correct | 1 ms | 364 KB | Ok |
13 | Incorrect | 1 ms | 364 KB | Jury has the better answer : jans = 3, pans = 2 |
14 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Ok |
2 | Correct | 1 ms | 364 KB | Ok |
3 | Correct | 1 ms | 364 KB | Ok |
4 | Correct | 1 ms | 364 KB | Ok |
5 | Correct | 1 ms | 364 KB | Ok |
6 | Correct | 1 ms | 364 KB | Ok |
7 | Correct | 1 ms | 364 KB | Ok |
8 | Correct | 1 ms | 364 KB | Ok |
9 | Correct | 1 ms | 364 KB | Ok |
10 | Correct | 1 ms | 364 KB | Ok |
11 | Correct | 1 ms | 384 KB | Ok |
12 | Correct | 1 ms | 364 KB | Ok |
13 | Incorrect | 1 ms | 364 KB | Jury has the better answer : jans = 3, pans = 2 |
14 | Halted | 0 ms | 0 KB | - |