Untitled
unknown
plain_text
5 days ago
3.1 kB
4
Indexable
Never
30 100 44 0 1 1 3 1 3 5 1 2 5 1 2 3 4 5 2 1 4 2 2 7 4 0 4 0 2 3 10 4 0 4 1 2 3 2 0 4 0 2 1 3 2 3 1 4 1 1 2 1 5 2 4 3 4 0 4 0 2 2 1 4 1 2 2 5 4 2 5 5 3 5 2 4 0 1 3 2 5 6 2 5 4 2 6 4 2 2 1 2 6 1 3 2 1 3 5 3 3 6 2 4 2 2 3 3 2 0 3 5 1 3 6 1 2 5 3 2 6 1 4 1 3 2 1 10 2 2 10 4 0 4 1 3 75 0 1 1 1 18 2 18 3 4 0 2 18 14 2 18 9 3 18 3 2 18 5 3 18 4 3 18 4 3 18 4 4 0 3 18 4 4 1 1 4 0 3 18 3 2 18 12 3 18 4 2 18 19 2 18 11 4 0 3 18 6 4 1 1 3 18 5 3 18 5 4 0 3 18 5 4 0 3 18 5 2 18 18 4 0 3 18 6 4 1 1 4 0 2 18 24 3 18 6 3 18 6 2 18 6 4 0 3 18 7 3 18 7 4 0 3 18 7 3 18 7 4 0 2 18 10 2 18 19 4 2 1 1 4 1 1 2 18 4 3 18 7 2 18 15 2 18 13 3 18 9 3 18 9 2 18 16 2 18 12 3 18 11 3 18 11 2 18 5 3 18 12 3 18 12 3 18 12 3 18 12 3 18 12 2 18 7 3 18 13 2 18 18 3 18 14 3 18 14 4 1 1 3 18 13 4 0 4 0 4 1 1 /* #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif #include <stdio.h> #define MAX_N 10 #define MAX_ORDER 20000 extern void init(void); extern void addCookieCutter(int mID, int N, int mShapeList[]); extern void orderCookie(int mShape, int daysLeft); extern int checkRemain(int mShape); extern void newDay(void); ///////////////////////////////////////////////////////////////////////// static int mIDList[MAX_ORDER]; static int mIDCnt; void makeCookies(int mID) { if (mIDCnt >= MAX_ORDER) return; mIDList[mIDCnt++] = mID; } ///////////////////////////////////////////////////////////////////////// #define INIT 0 #define ADD_COOKIECUTTER 1 #define ORDER_COOKIE 2 #define CHECK_REMAIN 3 #define NEW_DAY 4 static bool run() { int mID; int N, mShapeList[MAX_N]; int mShape, daysLeft; int Q; int cmd, ret = 0, ans; scanf("%d", &Q); bool okay = false; for (int i = 0; i < Q; ++i) { scanf("%d", &cmd); switch (cmd) { case INIT: init(); okay = true; break; case ADD_COOKIECUTTER: scanf("%d %d", &mID, &N); for (int j = 0; j < N; ++j) scanf("%d", &mShapeList[j]); if (okay) addCookieCutter(mID, N, mShapeList); break; case ORDER_COOKIE: scanf("%d %d", &mShape, &daysLeft); if (okay) orderCookie(mShape, daysLeft); break; case CHECK_REMAIN: scanf("%d", &mShape); if (okay) ret = checkRemain(mShape); scanf("%d", &ans); if (ret != ans) okay = false; break; case NEW_DAY: mIDCnt = 0; if (okay) newDay(); scanf("%d", &ans); if (mIDCnt != ans) okay = false; for (int k = 0; k < ans; ++k) { int mID_a; scanf("%d", &mID_a); if (mIDList[k] != mID_a) okay = false; } break; default: okay = false; } } return okay; } int main() { setbuf(stdout, NULL); freopen("sample_input.txt", "r", stdin); int T, MARK; scanf("%d %d", &T, &MARK); for (int tc = 1; tc <= T; tc++) { int score = run() ? MARK : 0; printf("#%d %d\n", tc, score); } return 0; } */
Leave a Comment