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_39022773_8900.cpp: In function 'int main()':
0_0_39022773_8900.cpp:9:1: error: 'scanf' was not declared in this scope
    9 | scanf("%d", &T);
      | ^~~~~
0_0_39022773_8900.cpp:11:1: error: 'memset' was not declared in this scope
   11 | memset(dp, 0, sizeof(dp));
      | ^~~~~~
0_0_39022773_8900.cpp:2:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
    1 | #include <algorithm>
  +++ |+#include <cstring>
    2 | using namespace std;
0_0_39022773_8900.cpp:14:28: error: the value of 'm' is not usable in a constant expression
   14 | for (int j = 0; j < (1 << m); j++) {
      |                            ^
0_0_39022773_8900.cpp:6:11: note: 'int m' is not const
    6 | int T, n, m, k, flag = 1;
      |           ^
0_0_39022773_8900.cpp:14:28: error: the value of 'm' is not usable in a constant expression
   14 | for (int j = 0; j < (1 << m); j++) {
      |                            ^
0_0_39022773_8900.cpp:6:11: note: 'int m' is not const
    6 | int T, n, m, k, flag = 1;
      |           ^
0_0_39022773_8900.cpp:14:28: error: the value of 'm' is not usable in a constant expression
   14 | for (int j = 0; j < (1 << m); j++) {
      |                            ^
0_0_39022773_8900.cpp:6:11: note: 'int m' is not const
    6 | int T, n, m, k, flag = 1;
      |           ^
0_0_39022773_8900.cpp:14:28: error: the value of 'm' is not usable in a constant expression
   14 | for (int j = 0; j < (1 << m); j++) {
      |                            ^
0_0_39022773_8900.cpp:6:11: note: 'int m' is not const
    6 | int T, n, m, k, flag = 1;
      |           ^
0_0_39022773_8900.cpp:14:28: error: the value of 'm' is not usable in a constant expression
   14 | for (int j = 0; j < (1 << m); j++) {
      |                            ^
0_0_39022773_8900.cpp:6:11: note: 'int m' is not const
    6 | int T, n, m, k, flag = 1;
      |           ^
0_0_39022773_8900.cpp:14:28: error: the value of 'm' is not usable in a constant expression
   14 | for (int j = 0; j < (1 << m); j++) {
      |                            ^
0_0_39022773_8900.cpp:6:11: note: 'int m' is not const
    6 | int T, n, m, k, flag = 1;
      |           ^
0_0_39022773_8900.cpp:14:28: error: the value of 'm' is not usable in a constant expression
   14 | for (int j = 0; j < (1 << m); j++) {
      |                            ^
0_0_39022773_8900.cpp:6:11: note: 'int m' is not const
    6 | int T, n, m, k, flag = 1;
      |           ^
0_0_39022773_8900.cpp:14:28: error: the value of 'm' is not usable in a constant expression
   14 | for (int j = 0; j < (1 << m); j++) {
      |                            ^
0_0_39022773_8900.cpp:6:11: note: 'int m' is not const
    6 | int T, n, m, k, flag = 1;
      |           ^
0_0_39022773_8900.cpp:14:28: error: the value of 'm' is not usable in a constant expression
   14 | for (int j = 0; j < (1 << m); j++) {
      |                            ^
0_0_39022773_8900.cpp:6:11: note: 'int m' is not const
    6 | int T, n, m, k, flag = 1;
      |           ^
0_0_39022773_8900.cpp:14:17: error: 'j' was not declared in this scope
   14 | for (int j = 0; j < (1 << m); j++) {
      |                 ^
0_0_39022773_8900.cpp:31:1: error: 'printf' was not declared in this scope
   31 | printf("Case #%d: ", flag++);
      | ^~~~~~
0_0_39022773_8900.cpp:2:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
    1 | #include <algorithm>
  +++ |+#include <cstdio>
    2 | using namespace std;


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-22 23:00:56, Gzip enabled