F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39483790_29777.cpp: In function 'int main()':
0_0_39483790_29777.cpp:2:9: error: 'stack' was not declared in this scope
    2 |         stack<int> stk;
      |         ^~~~~
0_0_39483790_29777.cpp:2:15: error: expected primary-expression before 'int'
    2 |         stack<int> stk;
      |               ^~~
0_0_39483790_29777.cpp:4:16: error: 'cin' was not declared in this scope
    4 |         while (cin >> n >> r) {
      |                ^~~
0_0_39483790_29777.cpp:6:25: error: 'cout' was not declared in this scope
    6 |                         cout << "0" << endl;
      |                         ^~~~
0_0_39483790_29777.cpp:6:40: error: 'endl' was not declared in this scope
    6 |                         cout << "0" << endl;
      |                                        ^~~~
0_0_39483790_29777.cpp:13:25: error: 'stk' was not declared in this scope; did you mean 'std'?
   13 |                         stk.push(n % r);
      |                         ^~~
      |                         std
0_0_39483790_29777.cpp:15:26: error: 'stk' was not declared in this scope; did you mean 'std'?
   15 |                 }while (!stk.empty()) {
      |                          ^~~
      |                          std
0_0_39483790_29777.cpp:18:33: error: 'cout' was not declared in this scope
   18 |                                 cout << c;
      |                                 ^~~~
0_0_39483790_29777.cpp:20:30: error: 'cout' was not declared in this scope
   20 |                         else cout << stk.top();
      |                              ^~~~
0_0_39483790_29777.cpp:22:27: error: expected '}' at end of input
   22 |                 }return 0;
      |                           ^
0_0_39483790_29777.cpp:4:31: note: to match this '{'
    4 |         while (cin >> n >> r) {
      |                               ^
0_0_39483790_29777.cpp:22:27: error: expected '}' at end of input
   22 |                 }return 0;
      |                           ^
0_0_39483790_29777.cpp:1:12: note: to match this '{'
    1 | int main() {
      |            ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-16 07:15:22, Gzip enabled