Hi, this is the very first Blog I wrote! Since I am an OIer, this is going to be about programming problems! Let’s begin with a simple one.
Problem Description: Given two numbers A, B, print the output of A + B ( A,B ≤ ).
Sample Input:
1 2
Sample Output:
3
Ideas: Emm.., I guess everyone knows how to do it, but it is a good thing to remember when to use long long.
#include <iostream> #include <cstring> #include <string> #include <vector> #include <queue> #include <map> #include <set> #include <stdio.h> #include <fstream> #include <cmath> #include <stdlib.h> #include <iomanip> #include <algorithm> using namespace std; #define FAST_IO ios::sync_with_stdio(false); typedef pair<int,int> pii; typedef pair<long long,long long> pll; typedef pair<double,double> pdd; const int maxn = 1e6 + 10; int main(){ int a,b; cin>>a>>b; cout<<a + b<<endl; return 0; }