結果
問題 | No.8032 Unavailability of Inequality Signs |
ユーザー |
![]() |
提出日時 | 2018-04-01 22:32:51 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 561 bytes |
コンパイル時間 | 1,226 ms |
コンパイル使用メモリ | 158,384 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 05:57:03 |
合計ジャッジ時間 | 2,973 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:15:21: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 15 | int N; scanf("%d", &N); | ~~~~~^~~~~~~~~~ main.cpp:19:32: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 19 | int a, b; scanf("%d %d", &a, &b); | ~~~~~^~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>#define rep(i,n) for(int i=0;i<(n);++i)#define ALL(A) A.begin(), A.end()using namespace std;typedef long long ll;int ab[100];int main(){memset(ab, 0, sizeof(ab));ios_base::sync_with_stdio(0);cin.tie(0);int N; scanf("%d", &N);vector<int> ab(N, 0);rep (i, N){int a, b; scanf("%d %d", &a, &b);ab[i] = a - b;if (ab[i] == 0){printf("=\n");}elseif ((unsigned int)(ab[i] & 2147483648)){printf("%c\n",(char)(0x3c));}else{printf("%c\n",(char)(0x3e));} // end if} // end repreturn 0;}