/ SeriousOJ /

Record Detail

Compile Error

foo.cc: In function 'int main()':
foo.cc:10:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |     cin>>n;
      |     ^~~
      |     std::cin
In file included from foo.cc:5:
/usr/include/c++/13/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
foo.cc:11:20: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     if(n*2 <= 100) cout<<"YES\n";
      |                    ^~~~
      |                    std::cout
/usr/include/c++/13/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
foo.cc:12:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     else cout<<"NO\n";
      |          ^~~~
      |          std::cout
/usr/include/c++/13/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~

Code

/**
 *  Author : Shafi
 * 
 ***/
#include <iostream>

int main() {
    // Write C++ code here
    int n;
    cin>>n;
    if(n*2 <= 100) cout<<"YES\n";
    else cout<<"NO\n";
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1056 Grown up boy sunny
Contest
Brain Booster #3
Language
C++20 (G++ 13.2.0)
Submit At
2024-05-06 15:18:51
Judged At
2024-11-11 03:34:45
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes