Submission #431478

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4314782021-06-17 12:08:08mat_vTropical Garden (IOI11_garden)C++14
100 / 100
232 ms53912 KiB
#include "garden.h"
#include "gardenlib.h"
#include <bits/stdc++.h>
#define ff(i,a,b) for(int (i) = (a); (i) <= (b); ++(i))
#define maxN 150005
#define pb push_back
using namespace std;
int n,m;
int p;
int q;
vector<int> _graf[maxN];
int slika[2 * maxN];
vector<int> graf[2 * maxN];
int najv[maxN];
int da(int x, int y){
if(najv[x] == y)return 1;
return 0;
}
int kveri[maxN];
int ans[maxN];
bool bio[2 * maxN];
vector<int> v[2 * maxN];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

garden.cpp: In function 'void resi(int)':
garden.cpp:5:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    5 | #define ff(i,a,b) for(int (i) = (a); (i) <= (b); ++(i))
      |                           ^
garden.cpp:47:5: note: in expansion of macro 'ff'
   47 |     ff(i,1,2*n)bio[i] = 0;
      |     ^~
garden.cpp:5:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    5 | #define ff(i,a,b) for(int (i) = (a); (i) <= (b); ++(i))
      |                           ^
garden.cpp:61:5: note: in expansion of macro 'ff'
   61 |     ff(i,0,2*n)v[i].clear();
      |     ^~
garden.cpp:5:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    5 | #define ff(i,a,b) for(int (i) = (a); (i) <= (b); ++(i))
      |                           ^
garden.cpp:62:5: note: in expansion of macro 'ff'
   62 |     ff(i,0,2*n)bio[i] = 0;
      |     ^~
garden.cpp:5:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    5 | #define ff(i,a,b) for(int (i) = (a); (i) <= (b); ++(i))
      |                           ^
garden.cpp:65:5: note: in expansion of macro 'ff'
   65 |     ff(i,0,duz - 1)sort(v[i].begin(), v[i].end());
      |     ^~
garden.cpp:5:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    5 | #define ff(i,a,b) for(int (i) = (a); (i) <= (b); ++(i))
      |                           ^
garden.cpp:66:5: note: in expansion of macro 'ff'
   66 |     ff(i,1,q){
      |     ^~
garden.cpp: In function 'void count_routes(int, int, int, int (*)[2], int, int*)':
garden.cpp:5:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    5 | #define ff(i,a,b) for(int (i) = (a); (i) <= (b); ++(i))
      |                           ^
garden.cpp:92:5: note: in expansion of macro 'ff'
   92 |     ff(i,0,q - 1)kveri[i + 1] = G[i];
      |     ^~
garden.cpp:5:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    5 | #define ff(i,a,b) for(int (i) = (a); (i) <= (b); ++(i))
      |                           ^
garden.cpp:93:5: note: in expansion of macro 'ff'
   93 |     ff(i,0,m - 1){
      |     ^~
garden.cpp:5:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    5 | #define ff(i,a,b) for(int (i) = (a); (i) <= (b); ++(i))
      |                           ^
garden.cpp:101:5: note: in expansion of macro 'ff'
  101 |     ff(i,1,n){
      |     ^~
garden.cpp:5:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    5 | #define ff(i,a,b) for(int (i) = (a); (i) <= (b); ++(i))
      |                           ^
garden.cpp:121:5: note: in expansion of macro 'ff'
  121 |     ff(i,1,q)answer(ans[i]);
      |     ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...