Submission #319114

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3191142020-11-04 01:09:31daringtriflesGondola (IOI14_gondola)C++17
Compilation error
0 ms0 KiB
//control+option+n to run!
#include <bits/stdc++.h>
#include "gondola.h"
using namespace std;
#define pb push_back
#define ll long long
#define pll pair<ll, ll>
#define FOR(i, a, b) for (signed long long i = (signed long long)(a); i < (signed long long)(b); i++)
#define NEGFOR(i, a, b) for (ll i = (a); i > (b); i--)
#define vll vector<long long>
#define sll set<long long>
#define ld long double
#define inf 1000000000000000000
#define mll multiset<long long>
#define vpll vector<pll>
#define nn << "\n"
#define ss << " "
#define F(i, b) for (ll i = 0; i < b; i++)
int valid(int n, int inputSeq[]){
ll mi=inf, curr;
FOR(i,0,n){
if(mi>inputSeq[i]){
curr=i;
}
mi=min(mi,(ll)inputSeq[i]);
}
ll past=mi-1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

gondola.cpp: In function 'int valid(int, int*)':
gondola.cpp:23:14: warning: 'curr' may be used uninitialized in this function [-Wmaybe-uninitialized]
   23 |   ll mi=inf, curr;
      |              ^~~~
/tmp/ccXhzN6W.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cccMjQe5.o:gondola.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status