helloo, codeforce!!!11!
problem statement is: given a and b, print a + b. a and b <= 1000000000
why is this problem giving ''time limit exceedded''?????
here is my submisssion:
#include <iostream>
using namespace std;
int main()
{
int a, b;
int i;
int answerr = 0;
cin >> a;
cin >> b; for (i = 1; i<=a; i = i + 1) answerr = answerr + 1; for (i = 1; i<=b; i = i + 1) answerr = answerr + 1; cout << answerr; return 0; }
pleasse helppp, thank you!!111!!
After seeing this post, I got a feeling why codeforces didn't have the report option.
That is a lie. It shouldn't get TLE. The reason for that is compiler optimizations. And as you declared a,b,i as integers not volatile integers, so it shouldn't timeout as compiler optimizes the loop to O(1) only. Now, stop lying greendian.
That's a strong assumption to make given that we don't know what compiler he is using and whether optimisation is turned on or not.
Smh. Fake news. It gets an AC in 0.00s.
Proof
Elo Sir. I sir had same issue. plz help???
include <bits/stdc++.h>
using namespace std;
define ll long long int
define SLOWIO sync_with_stdio(true); cout.tie(cin); cout.tie(cerr); cin.tie(cout); cin.tie(cerr); cerr.tie(cout); cerr.tie(cin);
int main() { SLOWIO ll a, b; cin >> a >> b; cout << "Is it rated?" << endl; return 0; }
may codeforce be with us!!!1!!111!