Submission #378920

#TimeUsernameProblemLanguageResultExecution timeMemory
378920fhvirusNice sequence (IZhO18_sequence)C++17
6 / 100
1 ms512 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define ff first #define ss second #define pb emplace_back #define AI(x) begin(x),end(x) template<typename I> bool chmax(I &a, I b){ return a < b ? (a = b, true) : false;} template<typename I> bool chmin(I &a, I b){ return a > b ? (a = b, true) : false;} #ifdef OWO #define debug(args...) LKJ("[ " + string(#args) + " ]", args) void LKJ(){ cerr<<endl;} template<class I, class...T> void LKJ(I x, T... t){ cerr<<x<<", ", LKJ(t...);} template<class I> void DE(I a, I b){ while(a < b) cerr<<*a<<" \n"[next(a) == b], ++a;} #else #define debug(...) 0 #define DE(...) 0 #endif void solve(){ int n, m; cin >> n >> m; int rev = 1; if(n < m) swap(n, m), rev = -1; cout << n - 1 << '\n'; if(n - 1 == 0) return; for(int i = 0; i < n - 1; ++i) cout << 1 * rev << ' '; cout << '\n'; return; } int32_t main(){ ios_base::sync_with_stdio(0); int t; cin >> t; for(; t; --t) solve(); return 0; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...