제출 #1184240

#제출 시각아이디문제언어결과실행 시간메모리
1184240ada_kayaRoom Temperature (JOI24_ho_t1)C++20
컴파일 에러
0 ms0 KiB
#define int long long #define inf ((int)1e18) using namespace std; void solve(){ /*int n,t; cin >> n >> t; int a[n]; for(int i = 0; i < n; i++){ cin >> a[i]; } int x = a[0] % t; int y = a[1] % t; if(x == 0 || y == 0){ } cout << x << y;*/ cout << 0; } int32_t main(){ fast int x = 1; //cin >> x; while(x--){ solve(); cout << endl; } }

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

Main.cpp: In function 'void solve()':
Main.cpp:18:4: error: 'cout' was not declared in this scope
   18 |    cout << 0;
      |    ^~~~
Main.cpp:1:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
  +++ |+#include <iostream>
    1 | #define int long long
Main.cpp: At global scope:
Main.cpp:21:1: error: 'int32_t' does not name a type
   21 | int32_t main(){
      | ^~~~~~~
Main.cpp:1:1: note: 'int32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
  +++ |+#include <cstdint>
    1 | #define int long long