Saturday, December 7, 2013

12036-Stable Grid

12036-Stable Grid:
Problem Link:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3187

Diffficulty Description : esay
Solution Description : Simply Grid Problem

 Suppose Input
    n=3
    1 1 2
    2 2 1
    3 3 3

    Here 1 = 3 time, 2= 3 time, 3= 3 time
    if any number count more than n time then print no
    otherwise print yes

    For this example ans is "yes"

    Another Example
    n=3
   1 1 2
   2 2 3
   3 3 2

   Here 1 = 2 time, 2= 4 time, 3= 3 time
   Here number 2 is 4 time so. it is more then n 
   For this example ans is "no"

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home