Submission #894194

#TimeUsernameProblemLanguageResultExecution timeMemory
894194ozner77Arranging Shoes (IOI19_shoes)C++17
0 / 100
1 ms348 KiB
#include "shoes.h" #include <bits/stdc++.h> int a,b; long long count_swaps(std::vector<int> s) { scanf("%d",&a); for(int i=0;i<a;i++){ scanf("%d",&b); s.push_back(b); } if(s[0]<0){ printf("%d",0); }else{ printf("%d",1); } }

Compilation message (stderr)

shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | }
      | ^
shoes.cpp:5:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    5 |  scanf("%d",&a);
      |  ~~~~~^~~~~~~~~
shoes.cpp:7:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    7 |         scanf("%d",&b);
      |         ~~~~~^~~~~~~~~
#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...