HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Forums > Discussion of problems > topic:


Problem "Number of Student Certificates"

There is a contest!

В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания.

imesecanMar.05.2016 at 10:18:43 AM
0--- Test 1 ---
10
90 82 78 75 78 89 72
97 79 93 98 86 70 92
94 93 75 91 77 77 73
97 80 97 94 80 -1
99 87 94 73 76 -1
88 71 92 79 -1
96 92 81 83 -1
97 81 72 93 71 94 74
94 90 97 79 87 84 86
81 82 98 92 87 84 86
83 75

--- Pattern ---
4 4

srekaMar.05.2016 at 11:50:18 AM
1--- Test 2 ---
12
67 88 75 80 87 98 89
64 99 85 75 71 -1
66 87 97 84 98 -1
75 83 81 95 98 61 -1
85 99 84 78 80 90 99
78 96 70 80 99 94 73
63 62 96 65 91 94 81
81 83 90 60 94 84 89
99 70 85 63 77 67 88
89 60 61 94 -1
71 64 68 94 86 64 78
60 93 67 94 76 91 93
85 79

--- Pattern ---
1 6

imesecanJan.09.2017 at 03:41:07 PM
2You can initialize arrays to default values when you have fixed length array declaration. e.g.
int sum[101]={0};

When you have variable length array declaration, you can use a loop
int sum[n],i;
for(i=0;i<n;i++)
sum[i]=0;

or memset function.


www.contester.ru