Submission #71872102
Source Code Expand
N, M = map(int, input().split())
A = [*map(int, input().split())]
B = [*map(int, input().split())]
S = 0
for i in range(N):
for j in range(M):
S += abs(A[i] - B[j])
C = S %998244353
print(C)
Submission Info
| Submission Time | |
|---|---|
| Task | D - Sum of Differences |
| User | huwaso |
| Language | Python (CPython 3.13.7) |
| Score | 0 |
| Code Size | 204 Byte |
| Status | TLE |
| Exec Time | > 2000 ms |
| Memory | 55000 KiB |
Judge Result
| Set Name | Sample | All | ||||||
|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 400 | ||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00-sample-01.txt, 00-sample-02.txt |
| All | 00-sample-01.txt, 00-sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, 01-14.txt, 01-15.txt, 01-16.txt, 01-17.txt, 01-18.txt, 01-19.txt, 01-20.txt, 01-21.txt, 01-22.txt, 01-23.txt, 01-24.txt, 01-25.txt, 01-26.txt, 01-27.txt, 01-28.txt, 01-29.txt, 01-30.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00-sample-01.txt | AC | 13 ms | 9196 KiB |
| 00-sample-02.txt | AC | 12 ms | 9188 KiB |
| 01-01.txt | TLE | > 2000 ms | 10088 KiB |
| 01-02.txt | TLE | > 2000 ms | 9856 KiB |
| 01-03.txt | TLE | > 2000 ms | 9952 KiB |
| 01-04.txt | TLE | > 2000 ms | 9864 KiB |
| 01-05.txt | TLE | > 2000 ms | 10232 KiB |
| 01-06.txt | TLE | > 2000 ms | 10048 KiB |
| 01-07.txt | TLE | > 2000 ms | 10404 KiB |
| 01-08.txt | TLE | > 2000 ms | 10236 KiB |
| 01-09.txt | TLE | > 2000 ms | 10216 KiB |
| 01-10.txt | TLE | > 2000 ms | 10108 KiB |
| 01-11.txt | TLE | > 2000 ms | 10112 KiB |
| 01-12.txt | TLE | > 2000 ms | 10060 KiB |
| 01-13.txt | TLE | > 2000 ms | 10240 KiB |
| 01-14.txt | TLE | > 2000 ms | 10108 KiB |
| 01-15.txt | AC | 12 ms | 9196 KiB |
| 01-16.txt | AC | 12 ms | 9196 KiB |
| 01-17.txt | TLE | > 2000 ms | 46780 KiB |
| 01-18.txt | TLE | > 2000 ms | 41576 KiB |
| 01-19.txt | AC | 97 ms | 42084 KiB |
| 01-20.txt | AC | 112 ms | 41868 KiB |
| 01-21.txt | TLE | > 2000 ms | 55000 KiB |
| 01-22.txt | TLE | > 2000 ms | 54368 KiB |
| 01-23.txt | TLE | > 2000 ms | 54564 KiB |
| 01-24.txt | TLE | > 2000 ms | 54336 KiB |
| 01-25.txt | TLE | > 2000 ms | 54324 KiB |
| 01-26.txt | TLE | > 2000 ms | 54484 KiB |
| 01-27.txt | TLE | > 2000 ms | 40652 KiB |
| 01-28.txt | TLE | > 2000 ms | 43656 KiB |
| 01-29.txt | TLE | > 2000 ms | 42444 KiB |
| 01-30.txt | TLE | > 2000 ms | 48724 KiB |