Submission #1135981

#TimeUsernameProblemLanguageResultExecution timeMemory
1135981ahmetlbktd4A + B (IOI24_aplusb)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "aplusb.h"
#define ll long long
using namespace std;

ll sum(ll a,ll b){
	cout << a+b;
}

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	ll a,b;
	cin >> a >> b;
	sum(a,b);
}

Compilation message (stderr)

aplusb.cpp: In function 'long long int sum(long long int, long long int)':
aplusb.cpp:8:1: warning: no return statement in function returning non-void [-Wreturn-type]
    8 | }
      | ^
/usr/bin/ld: /tmp/cc6tL7vx.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccbTRLiH.o:aplusb.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cc6tL7vx.o: in function `main':
grader.cpp:(.text.startup+0x160): undefined reference to `sum(int, int)'
collect2: error: ld returned 1 exit status