|
|
вернуться в форумTest № 10 Послано Pavel 7 окт 2015 21:08 What's wrong? Please, answer me. #include <iostream> #include <vector> using namespace std; int main() { bool z; vector <int> so(0), st(0); unsigned int a; cin >> a; while (so.size() < a) { int soe; cin >> soe; so.push_back(soe); } unsigned int b; cin >> b; while (st.size() < b) { int ste; cin >> ste; st.push_back(ste); } for (unsigned int i = 0; i < so.size(); i++) for (unsigned int j = 0; j < st.size(); j++) { if (so[i] + st[j] == 10000) { z = true; } } if (z == true) { cout << "YES" << endl; } else { cout << "NO" << endl; } } Edited by author 24.10.2015 04:23 |
|
|