AtCoder Beginner Contest 355 A-F in 4 minutes [English Subtitles]

Поділитися
Вставка
  • Опубліковано 5 вер 2024

КОМЕНТАРІ • 40

  • @HelloingBoi-pk4io
    @HelloingBoi-pk4io 3 місяці тому +22

    A はsetなんか使わなくてもa != bの時に6-a-bすればO(1)で求まります

  • @astroflexx82
    @astroflexx82 3 місяці тому +19

    Every beginner contest ever:
    > solve ABCD in 40 min
    > Stare at E for 1 hour

    • @user-mj5sk4lu1t
      @user-mj5sk4lu1t 3 місяці тому +3

      same

    • @alokkumarsingh4641
      @alokkumarsingh4641 3 місяці тому

      how can c pass in n*t i wasted time in bitwise implementation

    • @kityune1596
      @kityune1596 3 місяці тому +1

      The difficulty gap between green and cyan/blue is too large

  • @user-mu1pn5uw5u
    @user-mu1pn5uw5u 3 місяці тому +4

    なんか海外の人に人気だし、動画出すの早すぎませんか!?たすかります

    • @user-xk6es4ni5f
      @user-xk6es4ni5f 3 місяці тому +3

      この人問題出してる側なので早いんじゃないですかね?
      前に動画内で言ってた気が…

  • @onurilgazsakir4696
    @onurilgazsakir4696 3 місяці тому +5

    I hope every single editorial could be as good as this

  • @cc-wb3lz
    @cc-wb3lz 3 місяці тому +6

    E問題BFSなのやば、、、
    グラフっぽくない問題がグラフの問題のときやっぱdiffあがるよなぁ

  • @necrrom
    @necrrom 3 місяці тому +3

    先週の反省を活かし、困ったらソートを考える精神で初の4完できました!
    eはともかく、fは解けそうだったのでこの調子で頑張ります💪

    • @evimalab
      @evimalab  3 місяці тому +1

      おめでとうございます!正直なところFはDとそこまでの差はないと思います(Eと順番が逆ならもっと解かれていたでしょう)。

    • @necrrom
      @necrrom 3 місяці тому

      ありがとうございます!
      頑張ります。

  • @lofibeats2344
    @lofibeats2344 3 місяці тому +6

    In problem a if A != B anawer is 6 - (A + B)

  • @sakamiyari
    @sakamiyari 3 місяці тому +1

    Dの問題、緑色に塗られている区間の下に[5,6]と書かれていますが、[7,9]だと思います。

    • @evimalab
      @evimalab  3 місяці тому

      ご指摘ありがとうございます。はい、その通りです。
      (こういったあからさまなミスの検出は驚くほど難しいです……。)

  • @CristianoRonaldo-vv6sv
    @CristianoRonaldo-vv6sv 3 місяці тому

    D can be solved using Binary search as well, which is also a common technique to use when dealing with intervals.
    from bisect import bisect_right
    n=int(input())
    q = sorted([list(map(int,input().split())) for _ in range(n)])
    a = [x for x,y in q]
    print(sum(bisect_right(a,q[i][1],i+1,n)-i-1 for i in range(n)))

    • @adriano4fk
      @adriano4fk 3 місяці тому

      could you do it in c++?

    • @Tomatos03
      @Tomatos03 3 місяці тому

      ​@@adriano4fk
      void sovle() {
      int n;
      cin >> n;
      node a[n + 1];
      rep(i, 1, n) {
      cin >> a[i].l >> a[i].r;
      }
      sort(a + 1, a + 1 + n, [](node x, node y){
      return x.l < y.l;
      });
      long long res = 0;
      rep(i, 1, n) {
      int l = i, r = n;
      while(l < r) {
      int mid = (l + r + 1) >> 1;
      if(a[mid].l

  • @user-eh3oi5rh7g
    @user-eh3oi5rh7g 3 місяці тому +1

    B問題は黒鍵と白鍵の並びがモチーフですね

    • @evimalab
      @evimalab  3 місяці тому

      それは考えましたが、違う気がしています。
      (それなら数列が2つある必要はなく、白鍵または黒鍵のうち一方の位置のみ与えれば十分だと思います……でないと白鍵でも黒鍵でもないものがあることになりそうです。)
      しかし、他になさそうでもあります。

    • @user-eh3oi5rh7g
      @user-eh3oi5rh7g 3 місяці тому

      @@evimalab 「白鍵として設置したい周波数」「黒鍵として設置したい周波数」の列がそれぞれ与えられた時に、白鍵が連続する箇所があるか?という問題であると捉えると自然であると感じました。

    • @evimalab
      @evimalab  3 місяці тому

      なるほど周波数ですか、制約の

  • @shreyansgarg6182
    @shreyansgarg6182 3 місяці тому

    Can you expand more on how bfs has to be applied in E?
    Thank You!

  • @kusumakhter6420
    @kusumakhter6420 3 місяці тому

    Hey evima!!!
    Can you give me some resources and problem on plan sweep technique to practice.
    Thank you 🤍

  • @kemertlu3154
    @kemertlu3154 3 місяці тому +1

    我想知道场均4题对标codeforces的rating是多少?

    • @jullien191
      @jullien191 3 місяці тому

      我觉得应该没办法

  • @joaomarcos7545
    @joaomarcos7545 3 місяці тому

    Are you preferring python over c++?

  • @dhivakarduraikandan
    @dhivakarduraikandan 3 місяці тому +2

    How the hell do u even think of E being a graph problem , Jeez......

  • @A0ikun1818
    @A0ikun1818 3 місяці тому

    ABCDF5完!
    Eは引き算までは気付いたけどBFSに気付けず…(ABC238Eの要領でできたのに

  • @KFlorent13
    @KFlorent13 3 місяці тому

    For problem B, I don't get why I need to do C = A + B instead of just working directly on a sorted A list.
    I just need to check if every element of A is equal to the next element right ?
    The following code passes all test cases except one, and I don't understand why (I can't find the test cases online). Does someone have an idea what is wrong ?
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    A.sort()
    for i in range(N - 1):
    if A[i]+1 == A[i+1]:
    print("Yes")
    exit()
    print("No")
    Thank you for your video.

    • @evimalab
      @evimalab  3 місяці тому

      > I just need to check if every element of A is equal to the next element right ?
      No. For example, if A = [1, 3] and B = [4], the answer is Yes. I suggest reading the problem statement again.
      (It is surprising that your code passed almost all test cases.)

    • @user-rp8xi1gy5q
      @user-rp8xi1gy5q 3 місяці тому

      "two consecutive elements" refers to c[i] and c[i+1], not a[i] and a[i+1]

    • @KFlorent13
      @KFlorent13 3 місяці тому

      Thanks for the answers, I misunderstood the problem.

  • @user-gr9mk1ib5k
    @user-gr9mk1ib5k 3 місяці тому

    3:03

  • @numberbasher269
    @numberbasher269 3 місяці тому

    first view!