Submission #422495

#TimeUsernameProblemLanguageResultExecution timeMemory
422495Andyvanh1Friend (IOI14_friend)C++14
8 / 100
1 ms332 KiB
#include <bits/stdc++.h>
#include "friend.h"
 
using namespace std;
 
#define vt vector
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define rep(i,x) for(int (i) = 0; (i) < (x); (i)++ )
 
typedef long long ll;
typedef long double ld;
typedef vt<int> vi;
typedef pair<int,int> pii;
 
bool arr[20][20];
 
int findSample(int n, int confidence[], int host[], int protocol[]){
    int ans = 0;
  rep(i,n)ans = max(ans,confidence[i]);
  return ans;
}

Compilation message (stderr)

friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:9:26: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    9 | #define rep(i,x) for(int (i) = 0; (i) < (x); (i)++ )
      |                          ^
friend.cpp:20:3: note: in expansion of macro 'rep'
   20 |   rep(i,n)ans = max(ans,confidence[i]);
      |   ^~~
#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...