Submission #144785

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1447852019-08-17 17:58:23tnbs10Spirale (COCI18_spirale)C++14
80 / 80
135 ms632 KiB
// HONI 17/18, kolo 5, zad.5 - spirale
// http://hsin.hr/honi/arhiva/2017_2018/kolo5_zadaci.pdf
#include <bits/stdc++.h>
#define MAXN 200
#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(c) (c).begin(), (c).end()
using namespace std;
ll n, m, k, x, y, t, a[MAXN][MAXN], sred = 70, smjer, sm[5];
void print(ll arr[MAXN][MAXN], int r, int s) {
for (int i = sred; i < sred + r; i++) {
for (int j = sred; j < sred + s; ++j) {
cout << a[i][j] << " ";
}
cout << "\n";
}
}
void spirc(int x, int y, int t) {
int curr = 1; ll prati = 1; smjer = 0;
while (x > 15 and x < 175 and y > 15 and y < 175) {
/*cout << x << " " << y << " " << " -> " << prati << "\n";*/
if (!a[x][y]) a[x][y] = prati;
else a[x][y] = min(prati, a[x][y]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...