Submission #1024297

#TimeUsernameProblemLanguageResultExecution timeMemory
1024297vjudge1Friend (IOI14_friend)C++17
16 / 100
1 ms600 KiB
#include "friend.h" #include<bits/stdc++.h> using namespace std; // Find out best sample int findSample(int n,int confidence[],int host[],int protocol[]){ int ans=0,ans2=0; for(int i=0;i<n;i++) ans+=confidence[i],ans2=max(ans2,confidence[i]); return protocol[1]==1?ans:ans2; }

Compilation message (stderr)

friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:7:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    7 |     for(int i=0;i<n;i++)
      |     ^~~
friend.cpp:9:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
    9 |  return protocol[1]==1?ans:ans2;
      |  ^~~~~~
#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...