結果
| 問題 |
No.696 square1001 and Permutation 5
|
| コンテスト | |
| ユーザー |
square1001
|
| 提出日時 | 2018-02-08 20:33:59 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 210 bytes |
| コンパイル時間 | 174 ms |
| コンパイル使用メモリ | 30,336 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 14:25:10 |
| 合計ジャッジ時間 | 1,317 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 12 |
ソースコード
#include <cstdio>
int n, a, b, l = 200000, c[400009]; long long ret;
int main() {
scanf("%d", &n);
while (n--) {
scanf("%d %d", &a, &b);
ret += c[b - a + l];
c[a - b + l]++;
}
printf("%lld\n", ret);
}
square1001