https://icpcarchive.ecs.baylor.edu/external/64/6465.pdf

황현

#include <stdio.h>


int main() {
        int c, z = 0, y, i, l, u, s, d;
        scanf("%d", &c);
        for(; z < c; ++z) {
                scanf("%d", &i);
                s = 0;
                scanf("%d", &l);
                for(y = 0; y < 14; ++y) {
                        scanf("%d", &u);
                        d = u - l;
                        l = u;
                        if(d == 1)
                                ++s;
                }
                printf("%d %d\n", i, s);
        }

        return 0;
}
Retrieved from http://wiki.zeropage.org/wiki.php/ACM_ICPC/Problems/6465
last modified 2021-02-07 05:22:20