ログイン
新規登録
AtsuoCoder Waseda Tour Finals 2025
読込中…
Home
Tasks
Clar
Submissions
Standings
提出 234152a3-9067-44df-8771-364db174b916
コード
#include <iostream> #Include <vector> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for(int i = 0;i < n;i++) { cin >> a.at(i); } sort(a.begin(), a.end()); for(int j = 0;j < n;j++) { if(a.at(j) != j) { cout << j << endl; break; } } }
結果
問題
点数
言語
結果
実行時間
メモリ
F - TLE
0
C++
WJ
0 ms
0 KiB
コンパイルエラー
Main.cpp:2:2: error: invalid preprocessing directive #Include; did you mean #include? 2 | #Include <vector> | ^~~~~~~ | include Main.cpp: In function 'int main()': Main.cpp:9:5: error: 'vector' was not declared in this scope 9 | vector<int> a(n); | ^~~~~~ Main.cpp:2:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? 1 | #include <iostream> +++ |+#include <vector> 2 | #Include <vector> Main.cpp:9:12: error: expected primary-expression before 'int' 9 | vector<int> a(n); | ^~~ Main.cpp:12:16: error: 'a' was not declared in this scope 12 | cin >> a.at(i); | ^ Main.cpp:14:10: error: 'a' was not declared in this scope 14 | sort(a.begin(), a.end()); | ^ Main.cpp:14:5: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(a.begin(), a.end()); | ^~~~ | short