| Task: | Physical Music |
| Sender: | KnowYourArchitecture |
| Submission time: | 2017-10-17 20:48:54 +0300 |
| Language: | C++ |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.24 s | details |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:21:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<res.size();++i)cout<<res[i]<<'\n';
^Code
#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
typedef long long ll;
int main(){
int Tn;
cin>>Tn;
while(Tn--){
int n;
cin >> n;
vector<int> res;
for (int i = 0; i < n; i++) {
int a;
cin >> a;
if (i+1<a)res.emplace_back(a);
}
sort(res.begin(),res.end());
cout<<res.size()<<'\n';
for(int i=0;i<res.size();++i)cout<<res[i]<<'\n';
}
}
