제출 #1273697

#제출 시각아이디문제언어결과실행 시간메모리
1273697nthvnSterilizing Spray (JOI15_sterilizing)C++20
컴파일 에러
0 ms0 KiB
struct Node{
	int dt[LG], lz;
	void combine(Node &a, Node &b){
		for(int i=0;i<LG;i++) dt[i] = a.dt[i]+ b.dt[i];
	}
	ll toNum(){
		ll ans =0;
		for(int i=LG-1;i>=0;i--){
			ans = ans*k + dt[i];
		}
		return ans;
	}
}tr[4*N];

void app_lz(Node &a, int lz){
	a.lz+= lz;
	
	memmove(a.dt, a.dt+lz, (LG-lz)*sizeof(int));
}

컴파일 시 표준 에러 (stderr) 메시지

sterilizing.cpp:2:16: error: 'LG' was not declared in this scope
    2 |         int dt[LG], lz;
      |                ^~
sterilizing.cpp:6:9: error: 'll' does not name a type
    6 |         ll toNum(){
      |         ^~
sterilizing.cpp: In member function 'void Node::combine(Node&, Node&)':
sterilizing.cpp:4:31: error: 'LG' was not declared in this scope
    4 |                 for(int i=0;i<LG;i++) dt[i] = a.dt[i]+ b.dt[i];
      |                               ^~
sterilizing.cpp:4:39: error: 'dt' was not declared in this scope
    4 |                 for(int i=0;i<LG;i++) dt[i] = a.dt[i]+ b.dt[i];
      |                                       ^~
sterilizing.cpp:4:49: error: 'struct Node' has no member named 'dt'
    4 |                 for(int i=0;i<LG;i++) dt[i] = a.dt[i]+ b.dt[i];
      |                                                 ^~
sterilizing.cpp:4:58: error: 'struct Node' has no member named 'dt'
    4 |                 for(int i=0;i<LG;i++) dt[i] = a.dt[i]+ b.dt[i];
      |                                                          ^~
sterilizing.cpp: At global scope:
sterilizing.cpp:13:7: error: 'N' was not declared in this scope
   13 | }tr[4*N];
      |       ^
sterilizing.cpp: In function 'void app_lz(Node&, int)':
sterilizing.cpp:18:19: error: 'struct Node' has no member named 'dt'
   18 |         memmove(a.dt, a.dt+lz, (LG-lz)*sizeof(int));
      |                   ^~
sterilizing.cpp:18:25: error: 'struct Node' has no member named 'dt'
   18 |         memmove(a.dt, a.dt+lz, (LG-lz)*sizeof(int));
      |                         ^~
sterilizing.cpp:18:33: error: 'LG' was not declared in this scope
   18 |         memmove(a.dt, a.dt+lz, (LG-lz)*sizeof(int));
      |                                 ^~
sterilizing.cpp:18:9: error: 'memmove' was not declared in this scope
   18 |         memmove(a.dt, a.dt+lz, (LG-lz)*sizeof(int));
      |         ^~~~~~~
sterilizing.cpp:1:1: note: 'memmove' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
  +++ |+#include <cstring>
    1 | struct Node{