제출 #316745

#제출 시각아이디문제언어결과실행 시간메모리
316745Dipto_DebdipArranging Shoes (IOI19_shoes)C++14
컴파일 에러
0 ms0 KiB
#pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") #include <bits/stdc++.h> int main(int argc, char const *argv[]) { int n, a, b; cin >> n; cin >> a >> b; if(a > 0) cout << 1 << endl; else cout << 0 << endl; return 0; }

컴파일 시 표준 에러 (stderr) 메시지

shoes.cpp:2: warning: ignoring #pragma GCC optimization [-Wunknown-pragmas]
    2 | #pragma GCC optimization ("O3")
      | 
shoes.cpp:3: warning: ignoring #pragma GCC optimization [-Wunknown-pragmas]
    3 | #pragma GCC optimization ("unroll-loops")
      | 
shoes.cpp: In function 'int main(int, const char**)':
shoes.cpp:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> n;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:75,
                 from shoes.cpp:4:
/usr/include/c++/9/iostream:60:18: note: 'std::cin' declared here
   60 |   extern istream cin;  /// Linked to standard input
      |                  ^~~
shoes.cpp:9:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   if(a > 0) cout << 1 << endl;
      |             ^~~~
      |             std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:75,
                 from shoes.cpp:4:
/usr/include/c++/9/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;  /// Linked to standard output
      |                  ^~~~
shoes.cpp:9:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   if(a > 0) cout << 1 << endl;
      |                          ^~~~
      |                          std::endl
In file included from /usr/include/c++/9/istream:39,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from shoes.cpp:4:
/usr/include/c++/9/ostream:599:5: note: 'std::endl' declared here
  599 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
shoes.cpp:10:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   else cout << 0 << endl;
      |        ^~~~
      |        std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:75,
                 from shoes.cpp:4:
/usr/include/c++/9/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;  /// Linked to standard output
      |                  ^~~~
shoes.cpp:10:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |   else cout << 0 << endl;
      |                     ^~~~
      |                     std::endl
In file included from /usr/include/c++/9/istream:39,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from shoes.cpp:4:
/usr/include/c++/9/ostream:599:5: note: 'std::endl' declared here
  599 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~