Submission #1114030

#TimeUsernameProblemLanguageResultExecution timeMemory
1114030MuhammetGift (IZhO18_nicegift)C++17
0 / 100
206 ms35660 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; #define sz(v) (int)(v).size() int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll n, k; cin >> n >> k; vector <ll> a(n+1); for(int i = 1; i <= n; i++){ cin >> a[i]; } if(n % k != 0){ cout << -1; return 0; } cout << n/k << '\n'; for(int i = 1; i <= n; i += k){ cout << a[1] << " "; for(int j = i; j < i+k; j++){ cout << j << ' '; } cout << '\n'; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...