This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<iostream>
#include<stack>
#include<map>
#include<vector>
#include<string>
#include<cassert>
#include<unordered_map>
#include <queue>
#include <cstdint>
#include<cstring>
#include<limits.h>
#include<cmath>
#include<set>
#include<algorithm>
#include <iomanip>
#include<numeric>
#include<bitset>
using namespace std;
#define ll long long
#define f first
#define s second
#define pii pair<int,int>
#define ppii pair<int,pii>
#define vi vector<int>
#define pb push_back
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define F(n) for(int i=0;i<n;i++)
#define lb lower_bound
#define ub upper_bound
#define fastio ios::sync_with_stdio(false);cin.tie(NULL);
#pragma GCC optimize ("03,unroll-lopps")
//#define int long long
using namespace std;
const int mod=1e9+7,mxn=1e5+5,inf=1e9,minf=-1e9,lg=25;
int n,m,k,q;
vector<pii>v;
vector<int>adj[mxn+10];
int val[mxn+10],id[mxn+10],node;
bool repeat=0;
int GetBestPosition(int N, int C, int R, int *K, int *S, int *E){
//will this work??
v.clear();
n=N,q=C;
k=R;
for(int i=0;i<C;i++,S++,E++)v.pb({*S,*E});
node=n;
for(auto i:v){
for(int j=i.f;j<=i.s;j++){
node++;
}
}
node--;
return 0;
}
Compilation message (stderr)
tournament.cpp:32:40: warning: bad option '-funroll-lopps' to pragma 'optimize' [-Wpragmas]
32 | #pragma GCC optimize ("03,unroll-lopps")
| ^
tournament.cpp:41:64: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
41 | int GetBestPosition(int N, int C, int R, int *K, int *S, int *E){
| ^
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |