Submission #257313

#TimeUsernameProblemLanguageResultExecution timeMemory
257313browntoadLottery (CEOI18_lot)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #pragma GCC optimize ("Ofast", "unroll-loops") using namespace std; #define ll long long #define int ll #define FOR(i,a,b) for (int i = (a); i<(b); i++) #define REP(i,n) FOR(i,0,n) #define REP1(i,n) FOR(i,1,n+1) #define RREP(i,n) for (int i=(n)-1; i>=0; i--) #define f first #define s second #define pb push_back #define ALL(x) x.begin(),x.end() #define SZ(x) (int)(x.size()) #define SQ(x) (x)*(x) #define pii pair<int, int> #define pdd pair<double, double> #define endl '\n' //#define TOAD #ifdef TOAD #define bug(x) cerr<<__LINE__<<": "<<#x<<" is "<<x<<endl #define IOS() #else #define bug(...) #define IOS() ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); #endif const ll inf = 1ll<<60; const int iinf=2147483647; const ll mod = 998244353; const ll maxn=1e5+5; ll pw(ll x, ll p){ ll ret=1; while (p>0){ if (p&1){ ret*=x; ret%=mod; } x*=x; x%=mod; p>>=1; } return ret; } ll inv(ll x){ return pw(x, mod-2); } int qans[105][10005]; signed main(){ IOS(); int n,l; cin>>n>>l; vector<int> vc(n); REP(i,n) cin>>vc[i]; int k=n-l+1; vector<int> dp[2]; dp[0].resize(k); dp[1].resize(k); REP(i,k){ REP(j,k){ int cnt=0; if (i==0&&j==0){ dp[i%2][j]=0; continue; } if (j==0||i==0){ REP(x,l){ if (vc[x+i]!=vc[x+j]) cnt++; } dp[i%2][j]=cnt; qans[cnt][j]++; continue; } if (i==j) { dp[i%2][j]=0; continue; } dp[i%2][j]==dp[(i+1)%2][j-1]-(vc[i-1]!=vc[j-1])+(vc[i+l-1]!=vc[j+l-1]); qans[dp[i%2][j]][j]++; } } REP(i,k){ REP(j,) } int q; cin>>q; while (q--){ int val; cin>>val; REP(i,k){ } } }

Compilation message (stderr)

lot.cpp: In function 'int main()':
lot.cpp:76:23: warning: value computed is not used [-Wunused-value]
             dp[i%2][j]==dp[(i+1)%2][j-1]-(vc[i-1]!=vc[j-1])+(vc[i+l-1]!=vc[j+l-1]);
lot.cpp:6:42: error: expected primary-expression before ')' token
 #define FOR(i,a,b) for (int i = (a); i<(b); i++)
                                          ^
lot.cpp:7:18: note: in expansion of macro 'FOR'
 #define REP(i,n) FOR(i,0,n)
                  ^~~
lot.cpp:81:9: note: in expansion of macro 'REP'
         REP(j,)
         ^~~
lot.cpp:82:5: error: expected primary-expression before '}' token
     }
     ^