/ SeriousOJ /

Record Detail

Compile Error

foo.cc: In function 'void solve()':
foo.cc:4:17: error: expected unqualified-id before numeric constant
    4 | #define ll long LONG_MAX
      |                 ^~~~~~~~
foo.cc:8:5: note: in expansion of macro 'll'
    8 |     ll a,b;
      |     ^~
foo.cc:9:12: error: 'a' was not declared in this scope
    9 |     cin >> a>>b
      |            ^
foo.cc:9:15: error: 'b' was not declared in this scope
    9 |     cin >> a>>b
      |               ^
foo.cc: In function 'int main()':
foo.cc:4:17: error: expected unqualified-id before numeric constant
    4 | #define ll long LONG_MAX
      |                 ^~~~~~~~
foo.cc:14:5: note: in expansion of macro 'll'
   14 |     ll t;
      |     ^~
foo.cc:17:11: error: 't' was not declared in this scope; did you mean 'tm'?
   17 |     while(t--){
      |           ^
      |           tm

Code

#include<bits/stdc++.h>
using namespace std;

#define ll long LONG_MAX


void solve(){
    ll a,b;
    cin >> a>>b
    cout<< abs(a-b) <<endl;
}

int main(){
    ll t;
   // cin >> t;
    
    while(t--){
        solve();
    }
}

Information

Submit By
Type
Submission
Problem
P1226 Event Registration
Contest
LUCC Presents Kick & Code Intra LU Programming Contest
Language
C++17 (G++ 13.2.0)
Submit At
2025-09-01 05:17:12
Judged At
2025-09-01 05:17:12
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes