Category: ACM-ICPC
http://www.thedailystar.net/shout/cover-story/competitive-programming-where-computer-geeks-become-gladiators-1222453
code: #include<stdio.h> #include<stdlib.h> int main(){ char line[]=”1 -2 10000 -50 20 7 445 -4″; char *p,*e; long…
Swap in C #include<stdio.h> int main() { int x,y,z; x=5; y=7; printf(“Before x=%d y=%d\n”,x,y); z=x; x=y; y=z;…
Took hints from here: http://www.outsbook.com/uva/?page=latest_post&category=-1&id=12541 and https://github.com/morris821028/UVa/blob/master/volume125/12541%20-%20Birthdates.cpp Code: #include<bits/stdc++.h> using namespace std; int main() { //freopen(“in.txt”,”r”,stdin); int n,i;…
Accepted code: #include<bits/stdc++.h> using namespace std; int main() { int testcases,cases; long a,b,c; scanf(“%d”,&testcases); if(testcases>0 && testcases<20)…
Code: #include<bits/stdc++.h> using namespace std; int main() { int testcase,cs,j,a,b,low,high; int counter=0; scanf(“%d”,&testcase); for(cs=1; cs<=testcase; cs++) {…
Recent Comments