CSES - Aalto Competitive Programming 2024 - wk1 - Mon - Results
Submission details
Task:Stone game
Sender:minghao
Submission time:2024-09-02 16:35:57 +0300
Language:C++ (C++11)
Status:COMPILE ERROR

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:16:27: error: expected ';' before 'if'
   16 |     scanf("%d %d", &a, &b)
      |                           ^
      |                           ;
   17 |     if(a==b)
      |     ~~                     
input/code.cpp: In function 'void Test()':
input/code.cpp:10:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |     freopen("temp\\in.txt", "r", stdin);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
input/code.cpp: In function 'int main()':
input/code.cpp:16:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |     scanf("%d %d", &a, &b)
      |     ~~~~~^~~~~~~~~~~~~~~~~

Code

#include<iostream>
#include<cstdio>
#include<algorithm>
typedef long long LL;

const int N=10005;

void Test()
{
    freopen("temp\\in.txt", "r", stdin);
}
int main()
{
    // Test();
    int a, b;
    scanf("%d %d", &a, &b)
    if(a==b)
        printf("Maija")
    else
        printf("Uolevi")

    return 0;
}