| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1089953 | 12345678 | Nice sequence (IZhO18_sequence) | C++17 | 1 ms | 348 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int nx=2e5+5;
int n, m, f, _t, res[nx];
void solve()
{
cin>>n>>m;
f=n<m;
if (n==m) return cout<<0, void();
if (n>m) swap(n, m);
for (int i=1; i<m; i++) res[i]=1;
if (f) for (int i=1; i<m; i++) res[i]=-1;
cout<<m-1<<'\n';
for (int i=1; i<m; i++) cout<<res[i]<<' ';
cout<<'\n';
}
int main()
{
cin.tie(NULL)->sync_with_stdio(false);
cin>>_t;
while (_t--) solve();
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
