Submission #612109

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6121092022-07-29 10:52:09Andyvanh1Lottery (CEOI18_lot)C++14
100 / 100
2234 ms8524 KiB
#include <bits/stdc++.h>
using namespace std;
#define vt vector
#define pb push_back
#define all(x) x.begin(),x.end()
#define FORR1(x) for(int i = 0; i < (x); i++)
#define FORR2(j,x) for(int (j) = 0; (j) < (x); (j)++)
#define f first
#define s second
typedef vt<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
map<int,vi> mp;
map<int,int> dic;
int pp[10005];
int sz[10005];
int cst[10005];
int ans[10005][103];
int find(int x){
return (x==pp[x] ? x : pp[x] = find(pp[x]));
}
void join(int a, int b){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

lot.cpp: In function 'void solve()':
lot.cpp:9:28: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
    9 | #define FORR2(j,x) for(int (j) = 0; (j) < (x); (j)++)
      |                            ^
lot.cpp:87:9: note: in expansion of macro 'FORR2'
   87 |         FORR2(j,n){
      |         ^~~~~
lot.cpp:9:28: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
    9 | #define FORR2(j,x) for(int (j) = 0; (j) < (x); (j)++)
      |                            ^
lot.cpp:95:9: note: in expansion of macro 'FORR2'
   95 |         FORR2(j,l+1)cst[j] = 0;
      |         ^~~~~
lot.cpp:9:28: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
    9 | #define FORR2(j,x) for(int (j) = 0; (j) < (x); (j)++)
      |                            ^
lot.cpp:100:9: note: in expansion of macro 'FORR2'
  100 |         FORR2(j,q){
      |         ^~~~~
lot.cpp:9:28: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
    9 | #define FORR2(j,x) for(int (j) = 0; (j) < (x); (j)++)
      |                            ^
lot.cpp:108:9: note: in expansion of macro 'FORR2'
  108 |         FORR2(j,n){
      |         ^~~~~
lot.cpp:9:28: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
    9 | #define FORR2(j,x) for(int (j) = 0; (j) < (x); (j)++)
      |                            ^
lot.cpp:113:9: note: in expansion of macro 'FORR2'
  113 |         FORR2(j,n-l){
      |         ^~~~~
lot.cpp:9:28: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
    9 | #define FORR2(j,x) for(int (j) = 0; (j) < (x); (j)++)
      |                            ^
lot.cpp:123:9: note: in expansion of macro 'FORR2'
  123 |         FORR2(j,n-l+1)cout<<ans[j][i]-1<<' ';
      |         ^~~~~
lot.cpp:58:9: warning: unused variable 'k' [-Wunused-variable]
   58 |     int k = n-l+2;
      |         ^
#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...