1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

find

Last updated at Posted at 2022-02-22

x が含まれる場所を判定

find(a + l, a + r, x) (配列)
find(a.begin(), a.end(), x) (vector)

(xが含まれる: a[i]の itr) ( 複数ある場合は最初の値 )
(xが含まれない: a+r または a.endの itr)

<初めて現れる位置>
find(a + l, a + r, x) - a

int f = find(a + l, a + r + 1, x) - a;
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?