|  | 
|  | 
| вернуться в форум | I first get WA, and now is TLE, I even didn't changed my program! Is the juge bad??
 here is my program:
 someone who accepted can check it??
 Thanks for your kindness!
 
 #include <iostream>
 using namespace std;
 
 int N;
 
 int main()
 {
 int r1, r2, wait = -1;
 int nines = 0;
 
 cin >> N;
 for (int i = 0; i < N; ++i)
 {
 cin >> r1 >> r2;
 if (r1 + r2 != 9)
 {
 if (r1 + r2 > 9) {
 cout << wait + 1;
 while (nines > 0) {
 cout << 0;
 --nines;
 }
 }
 else {
 if (wait != -1)
 cout << wait;
 while (nines > 0) {
 cout << 9;
 --nines;
 }
 }
 wait = (r1 + r2) % 10;
 }
 else {
 nines++;
 }
 }
 //
 if (wait != -1)
 cout << wait;
 
 while (nines > 0) {
 cout << 9;
 --nines;
 }
 cout << endl;
 //
 return 0;
 }
I got it! So don't waste your time on it. | 
 | 
|