Submission #171156

#TimeUsernameProblemLanguageResultExecution timeMemory
171156juggernautNice sequence (IZhO18_sequence)C++14
6 / 100
3 ms400 KiB
//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==0)?1:n-m);
            puts("");
    }
}

Compilation message (stderr)

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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...