Submission #912417

#TimeUsernameProblemLanguageResultExecution timeMemory
912417HggfBinary Subsequences (info1cup17_binary)C++17
0 / 100
1039 ms19196 KiB
#pragma GCC optimize("O3") #pragma GCC target("avx2") #include <bits/stdc++.h> #define int long long #define endl "\n" using namespace std; string yn(bool ans){ return (ans?"YES":"NO"); } void gogo(){ int n; cin>>n; int u=n+2; int cnt=0; for(int j=1;j<=u;j++){ if(__gcd(j,u)==1){ cnt++; } } cout<<cnt<<endl; for(int i=1;i<=n;i++){ cout<<0<<' '; } cout<<endl; } main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); long long t=1; cin>>t; while(t--){ gogo(); } }

Compilation message (stderr)

binary.cpp:26:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   26 | main(){
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...