Submission #00098


ソースコード

ステータス

項目 データ
問題 0002 - JOI一次予選予想問題-2問目(2)
ユーザー名 ei2406
投稿日時 2025-09-03 17:16:05
言語 C++17
状態 Compile Error
得点 0
ソースコード長 116 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:4:3: error: ‘string’ was not declared in this scope
   string s, t;
   ^~~~~~
./Main.cpp:4:3: note: suggested alternative:
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/iosfwd:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stringfwd.h:74:33: note:   ‘std::__cxx11::string’
   typedef basic_string<char>    string;
                                 ^~~~~~
./Main.cpp:5:3: error: ‘cin’ was not declared in this scope
   cin >> s >> t;
   ^~~
./Main.cpp:5:3: note: suggested alternative:
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:75,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:60:18: note:   ‘std::cin’
   extern istream cin;  /// Linked to standard input
                  ^~~
./Main.cpp:5:10: error: ‘s’ was not declared in this scope
   cin >> s >> t;
          ^
./Main.cpp:5:15: error: ‘t’ was not declared in this scope
   cin >> s >> t;
               ^
./Main.cpp:5:15: note: suggested alternative: ‘tm’
   cin >> s >> t;
               ^
               tm
./Main.cpp:6:3: error: ‘cout’ was not declared in this scope
   cout << s.size() + t.size() << "\n";
   ^~~~
./Main.cpp:6:3: note: suggested alternative:
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:75,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:61:18: note:   ‘std::cout’
   extern ostream cout;  /// Linked to standard output
                  ^~~~

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #