Submission #595402

#TimeUsernameProblemLanguageResultExecution timeMemory
595402AdamGSCoins (LMIO19_monetos)C++17
10.02 / 100
8 ms540 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define rep(a, b) for(int a = 0; a < (b); ++a) #define st first #define nd second #define pb push_back #define all(a) a.begin(), a.end() const int LIM=307; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int t, n, k1, k2; cin >> t >> n >> k1 >> k2; rep(i, n) { rep(j, n) cout << (j>=n-i || j<n/2 && j==n-i-1 && i+j==n-1) << " "; cout << '\n'; } }

Compilation message (stderr)

monetos.cpp: In function 'int main()':
monetos.cpp:15:52: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   15 |     rep(j, n) cout << (j>=n-i || j<n/2 && j==n-i-1 && i+j==n-1) << " ";
      |                                  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...