I am a first year CS student, I learned C language very well and i was thinking about starting solving problems on online judges like UVa but i can't understand the questions and sample inputs and outputs, i haven't taken any algorithm courses at college though i have some small background, how can i start ?
_________________
island places to visit ~ things to do in au ~ history of automobiles
solving problems on online judges
Moderator: Board moderators
solving problems on online judges
Last edited by zinayel on Fri Aug 01, 2014 11:13 am, edited 1 time in total.
Re: solving problems on online judges
I can give you example. Problem 11172.
http://uva.onlinejudge.org/index.php?op ... oblem=2113
Your program must read from standart input and write to standart output. (When you write input data in cmd (for example) and program writes results there).
Don't read and write to files.
This is code
You can submit here
http://uva.onlinejudge.org/index.php?op ... D+13949950
You can select any of C/C++ languages.
http://uva.onlinejudge.org/index.php?op ... oblem=2113
Your program must read from standart input and write to standart output. (When you write input data in cmd (for example) and program writes results there).
Don't read and write to files.
This is code
Code: Select all
#include <stdio.h>
int main() {
int a, b, t;
scanf("%d", &t);
while (t--)
{
scanf("%d %d", &a, &b);
if (a == b) puts("=");
if (a < b) puts("<");
if (a > b) puts(">");
}
return 0;
}
http://uva.onlinejudge.org/index.php?op ... D+13949950
You can select any of C/C++ languages.
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman