Submission #61209

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
612092018-07-25 11:22:08baboBroken Device (JOI17_broken_device)C++14
Compilation error
0 ms0 KiB
//#include "Annalib.h"
#include <bits/stdc++.h>
#define L long long
using namespace std;
void Set(int,int);
int a[150];
void Anna(int N,L X,int K,int P[]){
int i;
L bit=1;
for(i=0;i<N;i++)
{
a[i]=0;
}
for(i=0;i<K;i++)
{
a[P[i]]=-1;
}
for(i=0;i<N;i+=3)
{
//printf("%lld\n",i);
if(X<bit) break;
L sum=a[i]+a[i+1]+a[i+2];
if(sum<=-2) continue;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Anna.cpp: In function 'int main()':
Anna.cpp:137:21: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
   scanf("%lld",&p[i]);
                ~~~~~^
Anna.cpp:134:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld %lld %lld",&n,&k,&x);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Anna.cpp:137:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld",&p[i]);
   ~~~~~^~~~~~~~~~~~~~
/tmp/cc5nR3nA.o: In function `Set(int, int)':
grader_anna.c:(.text+0x50): multiple definition of `Set(int, int)'
/tmp/cczgEOj3.o:Anna.cpp:(.text+0x240): first defined here
/tmp/cc5nR3nA.o: In function `main':
grader_anna.c:(.text.startup+0x0): multiple definition of `main'
/tmp/cczgEOj3.o:Anna.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status