Submission #475731

#TimeUsernameProblemLanguageResultExecution timeMemory
475731CaroLindaVepar (COCI21_vepar)C++14
0 / 70
1496 ms288988 KiB
#include <bits/stdc++.h> #define mkt make_tuple #define all(x) x.begin(),x.end() #define sz(x) (int)(x.size()) #define ll long long #define lp(i,a,b) for(int i = a ; i < b ; i++ ) #define pii pair<int,int> #define mk make_pair #define pb push_back const int MAX= 10000000 ; using namespace std ; int T ; int d[MAX+10] , idx[MAX+10] ; vector< vector<int> > lists ; vector<int> primes ; int main() { for(int i = 2 ; i <= MAX ; i++ ) { if(d[i] > 0 ) continue ; for(int j = i ; j <= MAX ; j += i ) if(d[j] == 0 ) d[j] = i ; } for(int i = 2 ; i <= MAX ; i++ ) { if(d[i] == i) { idx[i] = sz(primes) ; primes.push_back(i) ; lists.push_back( {i} ) ; continue ; } int x = i ; while(x>1) { int p = d[x] ; lists[idx[p]].pb( i ) ; x /= p ; } } scanf("%d", &T ) ; }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:50:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   50 |  scanf("%d", &T ) ;
      |  ~~~~~^~~~~~~~~~~
#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...