Submission #836955

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8369552023-08-24 18:08:21NemanjaSo2005Matching (CEOI11_mat)C++17
63 / 100
461 ms65536 KiB
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int N,K,M,niz[1000005],oduz[1000005],kol[1000005],H,H2;
int MOD=1000000009,b=1000003,stepen[1000005];
vector<vector<int>> on,off;
vector<int> R;
struct slog{
int sv,poz;
};
vector<slog> sniz;
bool posv(slog a,slog b){
return a.sv<b.sv;
}
struct cvor{
int cnt,mlt,rez=-1;
};
const int base=19;
vector<cvor> st;
vector<int> fwt;
cvor opr(cvor a,cvor b){
if(a.rez==-1)
return b;
if(b.rez==-1)
return a;
a.rez=(a.rez+b.rez+(ll)a.cnt*b.mlt)%MOD;
a.mlt+=b.mlt;
if(a.mlt>=MOD)
a.mlt-=MOD;
a.cnt+=b.cnt;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

mat.cpp: In function 'int main()':
mat.cpp:133:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  133 |       for(int j=0;j<on[i].size();j++)
      |                   ~^~~~~~~~~~~~~
mat.cpp:135:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  135 |       for(int j=0;j<off[i].size();j++)
      |                   ~^~~~~~~~~~~~~~
mat.cpp:161:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  161 |    for(int i=0;i<R.size();i++)
      |                ~^~~~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...