Submission #253430

#TimeUsernameProblemLanguageResultExecution timeMemory
253430BadrangiikhArranging Shoes (IOI19_shoes)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include <deque> #include <cmath> using namespace std; #define ll long long /*freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);*/ long long n , i ; long long shoes [ 200045 ] ; int main() { scanf ( "%lld" , & n ) ; for ( i = 0 ; i < 2 * n ; i ++ ) { scanf ( "%lld" , & shoes [ i ] ) ; } printf ( "%lld" , n * ( n - 1 ) / 2 ) ; }

Compilation message (stderr)

shoes.cpp: In function 'int main()':
shoes.cpp:15:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf ( "%lld" , & n ) ;
     ~~~~~~^~~~~~~~~~~~~~~~
shoes.cpp:17:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf ( "%lld" , & shoes [ i ] ) ;
         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/ccruQzV1.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccz7b3cU.o:shoes.cpp:(.text.startup+0x0): first defined here
/tmp/ccruQzV1.o: In function `main':
grader.cpp:(.text.startup+0x272): undefined reference to `count_swaps(std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status