답안 #939489

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
939489 2024-03-06T11:59:33 Z AkibAzmain Nice sequence (IZhO18_sequence) C++17
6 / 100
1 ms 600 KB
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using ll = long long;
using namespace __gnu_pbds;
template < class key, class compare = less < key > >
using iset = tree < key, null_type, compare, rb_tree_tag,
                    tree_order_statistics_node_update >;

void
solve (int tc, int ttc)
{
  int n, m;
  cin >> n >> m;
  cout << max (n, m) - 1 << '\n';
  for (int i = 0; i < max (n, m) - 1; ++i) cout << (n > m ? 1 : -1) << ' ';
  cout << '\n';
}

int
main ()
{
  ios::sync_with_stdio (false);
  cin.tie (nullptr);
  int ttc = 1;
  cin >> ttc;
  for (int tc = 1; tc <= ttc; ++tc) solve (tc, ttc);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Ok
2 Correct 1 ms 348 KB Ok
3 Correct 0 ms 348 KB Ok
4 Correct 1 ms 344 KB Ok
5 Correct 0 ms 452 KB Ok
6 Correct 1 ms 348 KB Ok
7 Correct 1 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 344 KB Ok
12 Correct 0 ms 600 KB Ok
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Jury has the better answer : jans = 3, pans = 2
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB Jury has the better answer : jans = 3, pans = 2
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 348 KB Jury has the better answer : jans = 3, pans = 2
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Ok
2 Correct 1 ms 348 KB Ok
3 Correct 0 ms 348 KB Ok
4 Correct 1 ms 344 KB Ok
5 Correct 0 ms 452 KB Ok
6 Correct 1 ms 348 KB Ok
7 Correct 1 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 344 KB Ok
12 Correct 0 ms 600 KB Ok
13 Incorrect 0 ms 344 KB Jury has the better answer : jans = 3, pans = 2
14 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Ok
2 Correct 1 ms 348 KB Ok
3 Correct 0 ms 348 KB Ok
4 Correct 1 ms 344 KB Ok
5 Correct 0 ms 452 KB Ok
6 Correct 1 ms 348 KB Ok
7 Correct 1 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 344 KB Ok
12 Correct 0 ms 600 KB Ok
13 Incorrect 0 ms 348 KB Jury has the better answer : jans = 3, pans = 2
14 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Ok
2 Correct 1 ms 348 KB Ok
3 Correct 0 ms 348 KB Ok
4 Correct 1 ms 344 KB Ok
5 Correct 0 ms 452 KB Ok
6 Correct 1 ms 348 KB Ok
7 Correct 1 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 344 KB Ok
12 Correct 0 ms 600 KB Ok
13 Incorrect 0 ms 348 KB Jury has the better answer : jans = 3, pans = 2
14 Halted 0 ms 0 KB -