Submission #414924

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4149242021-05-31 10:40:32Pro_ktmrAirline Route Map (JOI18_airline)C++17
100 / 100
849 ms29304 KiB
#include"bits/stdc++.h"
#include"Alicelib.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 };
// void InitG(int V, int U)
// void MakeG(int pos, int C, int D)
void Alice(int N, int M, int A[], int B[]){
vector<pair<int,int>> ret;
rep(i, M) ret.pb({ A[i], B[i] });
rep(i, N){
rep(j, 10){
if((i>>j)&1) ret.pb({i, N+j});
}
}
rep(i, 10) ret.pb({ N+10, N+i });
rep(i, 9) ret.pb({ N+i, N+1+i });
rep(i, N+10){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Alice.cpp: In function 'void Alice(int, int, int*, int*)':
Alice.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Alice.cpp:21:2: note: in expansion of macro 'rep'
   21 |  rep(i, M) ret.pb({ A[i], B[i] });
      |  ^~~
Alice.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Alice.cpp:23:2: note: in expansion of macro 'rep'
   23 |  rep(i, N){
      |  ^~~
Alice.cpp:12:27: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Alice.cpp:24:3: note: in expansion of macro 'rep'
   24 |   rep(j, 10){
      |   ^~~
Alice.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Alice.cpp:28:2: note: in expansion of macro 'rep'
   28 |  rep(i, 10) ret.pb({ N+10, N+i });
      |  ^~~
Alice.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Alice.cpp:29:2: note: in expansion of macro 'rep'
   29 |  rep(i, 9) ret.pb({ N+i, N+1+i });
      |  ^~~
Alice.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Alice.cpp:30:2: note: in expansion of macro 'rep'
   30 |  rep(i, N+10){
      |  ^~~
Alice.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Alice.cpp:37:2: note: in expansion of macro 'rep'
   37 |  rep(i, ret.size()) MakeG(i, ret[i].first, ret[i].second);
      |  ^~~

Bob.cpp: In function 'bool isExist(std::vector<int>&, int)':
Bob.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Bob.cpp:20:2: note: in expansion of macro 'rep'
   20 |  rep(i, v.size()){
      |  ^~~
Bob.cpp: In function 'void Bob(int, int, int*, int*)':
Bob.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Bob.cpp:33:2: note: in expansion of macro 'rep'
   33 |  rep(i, U){
      |  ^~~
Bob.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Bob.cpp:42:2: note: in expansion of macro 'rep'
   42 |  rep(i, V){
      |  ^~~
Bob.cpp:43:18: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   43 |   if(e[i].size() == N+9){
      |      ~~~~~~~~~~~~^~~~~~
Bob.cpp:12:27: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Bob.cpp:45:4: note: in expansion of macro 'rep'
   45 |    rep(j, V){
      |    ^~~
Bob.cpp:12:27: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Bob.cpp:50:4: note: in expansion of macro 'rep'
   50 |    rep(j, 10){
      |    ^~~
Bob.cpp:53:34: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   53 |    if(c == 1 && e[t[0]].size()-2 == N/2) break;
      |                 ~~~~~~~~~~~~~~~~~^~~~~~
Bob.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Bob.cpp:57:2: note: in expansion of macro 'rep'
   57 |  rep(i, 9){
      |  ^~~
Bob.cpp:12:27: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Bob.cpp:58:3: note: in expansion of macro 'rep'
   58 |   rep(j, 10){
      |   ^~~
Bob.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Bob.cpp:71:2: note: in expansion of macro 'rep'
   71 |  rep(i, 10){
      |  ^~~
Bob.cpp:12:27: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Bob.cpp:72:3: note: in expansion of macro 'rep'
   72 |   rep(j, e[t[i]].size()){
      |   ^~~
Bob.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Bob.cpp:80:2: note: in expansion of macro 'rep'
   80 |  rep(i, U){
      |  ^~~
Bob.cpp:12:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   12 | #define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
      |                           ^
Bob.cpp:87:2: note: in expansion of macro 'rep'
   87 |  rep(i, edges.size()) MakeMap(edges[i].first, edges[i].second);
      |  ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...