{"url":"https://tic40.hatenablog.com/entry/2024/10/20/000038","type":"rich","height":"190","author_name":"tic40","categories":["ABC","AtCoder"],"blog_title":"Do Something","width":"100%","description":"AtCoder Beginner Contest 376 - AtCoder A - Candy Button \u6700\u5f8c\u306b\u98f4\u3092\u3082\u3089\u3063\u305f\u6642\u523b\u3092\u8a18\u61b6\u3057\u3066\u304a\u304f #include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0;i<n;i++) #define endl '\\n' int main() { int n,c; cin >> n >> c; int p = -1e4, ans = 0; REP(_,n) { int t; cin >> t; if (t-p >= c) { ans++; p = t; } } c\u2026","image_url":null,"provider_name":"Hatena Blog","title":"AtCoder abc376 \u53c2\u52a0\u30e1\u30e2","provider_url":"https://hatena.blog","blog_url":"https://tic40.hatenablog.com/","author_url":"https://blog.hatena.ne.jp/tic40/","version":"1.0","published":"2024-10-20 00:00:38","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftic40.hatenablog.com%2Fentry%2F2024%2F10%2F20%2F000038\" title=\"AtCoder abc376 \u53c2\u52a0\u30e1\u30e2 - Do Something\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}