solving problems on online judges

General topic about Valladolid Online Judge

Moderator: Board moderators

Post Reply
zinayel
New poster
Posts: 1
Joined: Thu Jun 19, 2014 11:06 am

solving problems on online judges

Post by zinayel » Sat Jul 26, 2014 12:28 pm

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
Last edited by zinayel on Fri Aug 01, 2014 11:13 am, edited 1 time in total.

lighted
Guru
Posts: 585
Joined: Wed Jun 11, 2014 9:56 pm
Location: Kyrgyzstan, Bishkek

Re: solving problems on online judges

Post by lighted » Sat Jul 26, 2014 6:33 pm

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

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;
}
You can submit here
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

Post Reply

Return to “General”