Submission #1073203

# Submission time Handle Problem Language Result Execution time Memory
1073203 2024-08-24T10:20:57 Z Sputnik123 Nice sequence (IZhO18_sequence) C++17
6 / 100
1 ms 360 KB
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#define pb push_back
#define in insert
#define pll pair<ll,ll>
#define vpl vector<pll>
#define vll vector <ll>
#define vl vector<ll>
#define F first
#define S second
#define ll long long
#define all(v) v.begin(),v.end()
#define endl "\n"
#define ull unsigned long long
#define ld long double
using namespace std;
//using namespace __gnu_pbds;
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt,fma")
const ll sz= 2e5 + 5;
const ll inf=1e18;
const ll mod=1e9+7;
const ll mod2=998244353;
const ll eps = 1e-12;
const ll P1=47; // for hashing 
const ll P2=41; // for hashing 
//template<class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
//template<class T> using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
// ll idx = 1;
void solve()
{
    ll n, m;
    cin >> n >> m;
    cout << max(n, m) - 1 << endl;
    for(ll i = 0 ;i < max(n, m) - 1; i++)
        cout << (n > m ? 1 : -1) << " ";
    cout << endl;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    long long t = 1;
    cin >> t;
    while(t--)
    {	   
        // cout << "Case " << (int) ix <<":\n";
        solve();
        ///idx++;
    }
}
/* 
Note : don`t use fast input in interactive questions
Note : Compare long double with eps = 1e-12
*/
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Ok
2 Correct 0 ms 348 KB Ok
3 Correct 0 ms 348 KB Ok
4 Correct 1 ms 348 KB Ok
5 Correct 0 ms 360 KB Ok
6 Correct 1 ms 348 KB Ok
7 Correct 0 ms 348 KB Ok
8 Correct 0 ms 348 KB Ok
9 Correct 0 ms 348 KB Ok
10 Correct 0 ms 348 KB Ok
11 Correct 0 ms 360 KB Ok
12 Correct 0 ms 348 KB Ok
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Jury has the better answer : jans = 3, pans = 2
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Jury has the better answer : jans = 3, pans = 2
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Jury has the better answer : jans = 3, pans = 2
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Ok
2 Correct 0 ms 348 KB Ok
3 Correct 0 ms 348 KB Ok
4 Correct 1 ms 348 KB Ok
5 Correct 0 ms 360 KB Ok
6 Correct 1 ms 348 KB Ok
7 Correct 0 ms 348 KB Ok
8 Correct 0 ms 348 KB Ok
9 Correct 0 ms 348 KB Ok
10 Correct 0 ms 348 KB Ok
11 Correct 0 ms 360 KB Ok
12 Correct 0 ms 348 KB Ok
13 Incorrect 0 ms 348 KB Jury has the better answer : jans = 3, pans = 2
14 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Ok
2 Correct 0 ms 348 KB Ok
3 Correct 0 ms 348 KB Ok
4 Correct 1 ms 348 KB Ok
5 Correct 0 ms 360 KB Ok
6 Correct 1 ms 348 KB Ok
7 Correct 0 ms 348 KB Ok
8 Correct 0 ms 348 KB Ok
9 Correct 0 ms 348 KB Ok
10 Correct 0 ms 348 KB Ok
11 Correct 0 ms 360 KB Ok
12 Correct 0 ms 348 KB Ok
13 Incorrect 1 ms 348 KB Jury has the better answer : jans = 3, pans = 2
14 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Ok
2 Correct 0 ms 348 KB Ok
3 Correct 0 ms 348 KB Ok
4 Correct 1 ms 348 KB Ok
5 Correct 0 ms 360 KB Ok
6 Correct 1 ms 348 KB Ok
7 Correct 0 ms 348 KB Ok
8 Correct 0 ms 348 KB Ok
9 Correct 0 ms 348 KB Ok
10 Correct 0 ms 348 KB Ok
11 Correct 0 ms 360 KB Ok
12 Correct 0 ms 348 KB Ok
13 Incorrect 1 ms 348 KB Jury has the better answer : jans = 3, pans = 2
14 Halted 0 ms 0 KB -