제출 #527061

#제출 시각아이디문제언어결과실행 시간메모리
527061LucaDantas이상한 기계 (APIO19_strange_device)C++17
10 / 100
5089 ms524292 KiB
// só pra não zerar, não aguento mais pensar depois do sofrimento do p2 #include <bits/stdc++.h> using namespace std; set<pair<long long,long long>> mark; int main() { long long n, A, B; scanf("%lld %lld %lld", &n, &A, &B); for(int i = 0; i < n; i++) { long long l, r; scanf("%lld %lld", &l, &r); for(long long t = l; t <= r; t++) mark.insert({(t + t/B) % A, t % B}); } printf("%ld\n", mark.size()); }

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

strange_device.cpp: In function 'int main()':
strange_device.cpp:8:26: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 |  long long n, A, B; scanf("%lld %lld %lld", &n, &A, &B);
      |                     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
strange_device.cpp:10:24: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |   long long l, r; scanf("%lld %lld", &l, &r);
      |                   ~~~~~^~~~~~~~~~~~~~~~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...