Submission #414927

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4149272021-05-31 10:41:09Pro_ktmrLibrary (JOI18_library)C++17
100 / 100
234 ms476 KiB
#include"bits/stdc++.h"
#include"library.h"
#include<unordered_set>
#include<unordered_map>
#include<random>
using namespace std;
typedef long long ll;
const ll MOD = (ll)(1e9+7);
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
int dx[4]={ 1,0,-1,0 };
int dy[4]={ 0,1,0,-1 };
namespace A{
int N;
vector<pair<int,int>> e;
int siz(int l, int r){
int ret = r-l;
rep(i, e.size()){
if(l <= e[i].first && e[i].first < r && l <= e[i].second && e[i].second < r) ret--;
}
return ret;
}
int Search1(int l, int r, int x){
if(l+1 == r) return l;
vector<int> tmp(N, 0);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

library.cpp: In function 'int A::siz(int, int)':
library.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
library.cpp:22:3: note: in expansion of macro 'rep'
   22 |   rep(i, e.size()){
      |   ^~~
library.cpp: In function 'void A::dfs(int, int, std::vector<int>&)':
library.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
library.cpp:55:3: note: in expansion of macro 'rep'
   55 |   rep(i, ls[n].size()){
      |   ^~~
library.cpp: In function 'void Solve(int)':
library.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
library.cpp:70:2: note: in expansion of macro 'rep'
   70 |  rep(i, N){
      |  ^~~
library.cpp:12:27: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
library.cpp:72:3: note: in expansion of macro 'rep'
   72 |   rep(j, i+1) tmp[j] = 1;
      |   ^~~
library.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
library.cpp:83:2: note: in expansion of macro 'rep'
   83 |  rep(i, e.size()){
      |  ^~~
library.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
library.cpp:87:2: note: in expansion of macro 'rep'
   87 |  rep(i, N){
      |  ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...