QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#647551#5513. Advertisement 2liuziao#10 98ms9504kbC++23967b2024-10-17 14:42:092024-10-17 14:42:10

Judging History

你现在查看的是最新测评结果

  • [2024-10-17 14:42:10]
  • 评测
  • 测评结果:10
  • 用时:98ms
  • 内存:9504kb
  • [2024-10-17 14:42:09]
  • 提交

answer

#include <bits/stdc++.h>

// #define int int64_t

const int kMaxN = 5e5 + 5;

int n;
int fa[kMaxN];
bool vis[kMaxN];
std::pair<int, int> a[kMaxN];

void dickdreamer() {
  std::cin >> n;
  for (int i = 1; i <= n; ++i) std::cin >> a[i].second >> a[i].first;
  std::sort(a + 1, a + 1 + n);
  n = std::unique(a + 1, a + 1 + n) - (a + 1);
  return void(std::cout << n << '\n');
  int ans = 0;
  for (int i = n; i; --i) {
    if (vis[i]) continue;
    vis[i] = 1, ++ans;
    for (int j = i - 1; j; --j)
      if (abs(a[i].second - a[j].second) <= a[i].first - a[j].first)
        vis[j] = 1;
  }
  std::cout << ans << '\n';
}

int32_t main() {
#ifdef ORZXKR
  freopen("in.txt", "r", stdin);
  freopen("out.txt", "w", stdout);
#endif
  std::ios::sync_with_stdio(0), std::cin.tie(0), std::cout.tie(0);
  int T = 1;
  // std::cin >> T;
  while (T--) dickdreamer();
  // std::cerr << 1.0 * clock() / CLOCKS_PER_SEC << "s\n";
  return 0;
}

詳細信息

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 25ms
memory: 4760kb

input:

128800
9199612 51970557
152303663 51970557
658020283 51970557
305169975 51970557
647937895 51970557
162441995 51970557
664350717 51970557
128813867 51970557
815800777 51970557
422654970 51970557
5325941 51970557
919605369 51970557
775929588 51970557
957253076 51970557
441558150 51970557
730596606 51...

output:

116732

result:

ok single line: '116732'

Test #2:

score: 10
Accepted
time: 36ms
memory: 6304kb

input:

178516
481507914 185523732
434623365 185523732
472444125 185523732
759573017 185523732
253426284 185523732
700756636 185523732
74218273 185523732
978855318 185523732
193027753 185523732
670445963 185523732
647115447 185523732
355737335 185523732
213219833 185523732
580124162 185523732
361750049 1855...

output:

77180

result:

ok single line: '77180'

Test #3:

score: 10
Accepted
time: 85ms
memory: 8796kb

input:

462572
101498948 303922224
642297835 303922224
417145698 303922224
889349783 303922224
434461522 303922224
93863358 303922224
215632530 303922224
832856402 303922224
703199983 303922224
809081237 303922224
557497978 303922224
655494326 303922224
195187810 303922224
812819691 303922224
814441567 3039...

output:

4625

result:

ok single line: '4625'

Test #4:

score: 10
Accepted
time: 38ms
memory: 7096kb

input:

325752
619184372 840273835
619184372 840273835
619184372 840273835
619184372 840273835
619184372 840273835
619184372 840273835
619184372 840273835
619184372 840273835
619184372 840273835
619184372 840273835
619184372 840273835
619184372 840273835
619184372 840273835
619184372 840273835
619184372 840...

output:

1

result:

ok single line: '1'

Test #5:

score: 10
Accepted
time: 98ms
memory: 7720kb

input:

500000
432233751 37126744
876209848 37126744
115636122 37126744
722895189 37126744
385407335 37126744
631777770 37126744
640127217 37126744
850533001 37126744
857281519 37126744
47214872 37126744
67273107 37126744
817606002 37126744
197019377 37126744
816304624 37126744
780928469 37126744
991314112 ...

output:

453173

result:

ok single line: '453173'

Test #6:

score: 10
Accepted
time: 97ms
memory: 8792kb

input:

500000
347979517 402569575
240027608 402569575
984267933 402569575
490577061 402569575
248258763 402569575
866530973 402569575
301265202 402569575
736701829 402569575
47460490 402569575
878566519 402569575
485021670 402569575
978430003 402569575
530094575 402569575
51797713 402569575
975446346 40256...

output:

216136

result:

ok single line: '216136'

Test #7:

score: 10
Accepted
time: 92ms
memory: 9504kb

input:

500000
394843641 428581569
931365318 428581569
205656498 428581569
325306857 428581569
567772605 428581569
495792279 428581569
521260039 428581569
275722970 428581569
168204637 428581569
882738248 428581569
211294121 428581569
236121938 428581569
498382424 428581569
406387147 428581569
664092862 428...

output:

5000

result:

ok single line: '5000'

Test #8:

score: 10
Accepted
time: 60ms
memory: 7840kb

input:

500000
180068482 502907510
180068482 502907510
180068482 502907510
180068482 502907510
180068482 502907510
180068482 502907510
180068482 502907510
180068482 502907510
180068482 502907510
180068482 502907510
180068482 502907510
180068482 502907510
180068482 502907510
180068482 502907510
180068482 502...

output:

1

result:

ok single line: '1'

Subtask #2:

score: 0
Wrong Answer

Test #9:

score: 0
Wrong Answer
time: 0ms
memory: 3672kb

input:

3
231636235 354089104
228392707 930073348
587735804 575683740

output:

3

result:

wrong answer 1st lines differ - expected: '2', found: '3'

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%