Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
为什么compile error了......#include <iostream> #include <vector> using namespace std; int main() { int nNumber; cin>>nNumber; while(nNumber != 0) { vector<int> vNumber(nNumber, 0); for (int i = 0; i < nNumber; i++) { cin>>vNumber[i]; } for (int i = 0; i < nNumber; i++) { if (i == 0) { cout<<vNumber[i]<<" "; } else { if (vNumber[i] != vNumber[i - 1]) { cout<<vNumber[i]<<" "; } } } cout<<"$"<<endl; cin>>nNumber; } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator