제출 #77221

#제출 시각아이디문제언어결과실행 시간메모리
77221antimirageNice sequence (IZhO18_sequence)C++17
6 / 100
4 ms832 KiB
#include <bits/stdc++.h> #define fr first #define sc second #define mk make_pair #define pb push_back #define sz(s) (int)s.size() #define all(s) s.begin(), s.end() using namespace std; int tests, n, m, fl = 1; main() { cin >> tests; while (tests--) { fl = -1; scanf("%d%d", &n, &m); if ( n > m ) swap(n, m), fl = 1; printf("%d\n", m - 1); for (int i = 1; i < m; i++) printf("%d ", 1 * fl); printf("\n"); } }

컴파일 시 표준 에러 (stderr) 메시지

sequence.cpp:14:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main()
      ^
sequence.cpp: In function 'int main()':
sequence.cpp:20:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d", &n, &m);
         ~~~~~^~~~~~~~~~~~~~~~
#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...