Submission #360146

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3601462021-01-27 14:30:59beksultan04Towns (IOI15_towns)C++14
25 / 100
24 ms384 KiB
#include "towns.h"
#ifndef EVAL
#include "grader.cpp"
#endif // EVAL
#include <bits/stdc++.h>
using namespace std;
#define lol long long
#define pii pair<int,int>
#define OK puts("OK");
#define NO puts("NO");
#define YES puts("YES");
#define fr first
#define sc second
#define ret return
#define scanl(a) scanf("%lld",&a);
#define scanll(a,b) scanf("%lld %lld",&a, &b);
#define scanlll(a,b,c) scanf("%lld %lld %lld",&a,&b,&c);
#define scan1(a) scanf("%d",&a);
#define scan2(a,b) scanf("%d %d",&a, &b);
#define scan3(a,b,c) scanf("%d %d %d",&a,&b,&c);
#define all(s) s.begin(),s.end()
#define allr(s) s.rbegin(),s.rend()
#define pb push_back
#define sz(v) (int)v.size()
#define endi puts("");
#define eps 1e-12
int dist[1000],distv[1000],distu[1000],a[1000],b[1000],c[1000];
int hubDistance(int N, int sub) {
int i,mx=0,j,v,u=0,len=2e9+7;
for( i=0;i<N;++i){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:69:13: warning: declaration of 'r' shadows a previous local [-Wshadow]
   69 |         int r=0,l=0,m=0;
      |             ^
towns.cpp:59:6: note: shadowed declaration is here
   59 |  int r=0,l=0,m=0;
      |      ^
towns.cpp:69:17: warning: declaration of 'l' shadows a previous local [-Wshadow]
   69 |         int r=0,l=0,m=0;
      |                 ^
towns.cpp:59:10: note: shadowed declaration is here
   59 |  int r=0,l=0,m=0;
      |          ^
towns.cpp:69:21: warning: declaration of 'm' shadows a previous local [-Wshadow]
   69 |         int r=0,l=0,m=0;
      |                     ^
towns.cpp:59:14: note: shadowed declaration is here
   59 |  int r=0,l=0,m=0;
      |              ^
towns.cpp:29:13: warning: unused variable 'j' [-Wunused-variable]
   29 |  int i,mx=0,j,v,u=0,len=2e9+7;
      |             ^
towns.cpp:28:28: warning: unused parameter 'sub' [-Wunused-parameter]
   28 | int hubDistance(int N, int sub) {
      |                        ~~~~^~~
towns.cpp:52:15: warning: 'v' may be used uninitialized in this function [-Wmaybe-uninitialized]
   52 |         if (i == v || i == u)continue;
      |             ~~^~~~
#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...