| Task: | Physical Music |
| Sender: | Antti Röyskö |
| Submission time: | 2017-10-17 19:44:14 +0300 |
| Language: | C++ |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.11 s | details |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:21:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0; i<ans.size(); ++i) cout << ans[i] << "\n";
^Code
#include <iostream>
#include <vector>
using namespace std;
int T;
vector<int> ans;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
cin >> T;
for (int i=0; i<T; ++i){
int N;
cin >> N;
ans.clear();
for (int i=1; i<=N; ++i){
int st;
cin >> st;
if (st<i) ans.push_back(i);
}
cout << ans.size() << "\n";
for (int i=0; i<ans.size(); ++i) cout << ans[i] << "\n";
}
}