Submission #171155

# Submission time Handle Problem Language Result Execution time Memory
171155 2019-12-27T13:58:10 Z juggernaut Nice sequence (IZhO18_sequence) C++14
0 / 100
2 ms 376 KB
//Just try and the idea will come!
#include<bits/stdc++.h>
#define int long long int
using namespace std;
int t,n,m,i;
main(){
    scanf("%lld",&t);
    while(t--){
        scanf("%lld%lld",&n,&m);
      printf("%lld\n",(max(n,m)-1));
      for(i=1;i<max(n,m);i++)printf("%lld ",n-m);
      puts("");
    }
}

Compilation message

sequence.cpp:6:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main(){
      ^
sequence.cpp: In function 'int main()':
sequence.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%lld",&t);
     ~~~~~^~~~~~~~~~~
sequence.cpp:9:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%lld%lld",&n,&m);
         ~~~~~^~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Ok
2 Correct 2 ms 256 KB Ok
3 Incorrect 2 ms 376 KB All the numbers must be nonzero
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB All the numbers must be nonzero
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Jury has the better answer : jans = 3, pans = 2
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB Jury has the better answer : jans = 3, pans = 2
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Ok
2 Correct 2 ms 256 KB Ok
3 Incorrect 2 ms 376 KB All the numbers must be nonzero
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Ok
2 Correct 2 ms 256 KB Ok
3 Incorrect 2 ms 376 KB All the numbers must be nonzero
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Ok
2 Correct 2 ms 256 KB Ok
3 Incorrect 2 ms 376 KB All the numbers must be nonzero
4 Halted 0 ms 0 KB -