Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

転倒数を求める時に重複を許すかどうか #16

Open
idat50me opened this issue Jul 5, 2023 · 0 comments
Open

転倒数を求める時に重複を許すかどうか #16

idat50me opened this issue Jul 5, 2023 · 0 comments

Comments

@idat50me
Copy link
Owner

idat50me commented Jul 5, 2023

重複を許さない場合は,

vint vcp = v;
sort(all(vcp));
v.erase(unique(v.begin(), v.end()), v.end());

して重複を除いた配列を作る必要がある

引数でフラグをとればよさそう

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant