#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <stdio.h>
#define CMD_INIT (100)
#define CMD_STOCK (200)
#define CMD_SHIP (300)
#define CMD_GET_HEIGHT (400)
extern void init(int N);
extern int stock(int mLoc, int mBox);
extern int ship(int mLoc, int mBox);
extern int getHeight(int mLoc);
static bool run()
{
int Q;
int N, mLoc, mBox;
int ret = -1, ans;
scanf("%d", &Q);
bool okay = false;
for (int q = 0; q < Q; ++q)
{
int cmd;
scanf("%d", &cmd);
switch(cmd)
{
case CMD_INIT:
scanf("%d", &N);
init(N);
okay = true;
break;
case CMD_STOCK:
scanf("%d %d", &mLoc, &mBox);
ret = stock(mLoc, mBox);
scanf("%d", &ans);
if (ret != ans)
okay = false;
break;
case CMD_SHIP:
scanf("%d %d", &mLoc, &mBox);
ret = ship(mLoc, mBox);
scanf("%d", &ans);
if (ret != ans)
okay = false;
break;
case CMD_GET_HEIGHT:
scanf("%d", &mLoc);
ret = getHeight(mLoc);
scanf("%d", &ans);
if (ret != ans)
okay = false;
break;
default:
okay = false;
break;
}
}
return okay;
}
int main()
{
setbuf(stdout, NULL);
//freopen("sample_input.txt", "r", stdin);
int TC, MARK;
scanf("%d %d", &TC, &MARK);
for (int tc = 1; tc <= TC; ++tc)
{
int score = run() ? MARK : 0;
printf("#%d %d\n", tc, score);
}
return 0;
}
void init(int N)
{
return;
}
int stock(int mLoc, int mBox)
{
return -1;
}
int ship(int mLoc, int mBox)
{
return -1;
}
int getHeight(int mLoc)
{
return -1;
}
25 100
15
100 8
200 3 4 4
300 3 4 0
400 3 0
200 5 2 2
200 7 3 7
200 1 1 11
200 3 3 17
200 8 1 18
200 4 5 20
200 7 3 27
400 7 6
300 4 3 21
300 7 3 18
400 4 2
23
100 6
200 1 1 1
200 6 1 6
300 6 1 1
200 1 1 2
200 2 1 3
200 1 1 4
300 1 3 1
200 6 1 5
400 5 0
200 5 1 5
300 6 1 4
200 2 1 5
300 5 1 2
400 4 0
200 2 1 3
200 2 1 4
200 1 1 5
400 2 4
300 1 1 4
300 2 2 2
400 5 0
200 2 1 3
27
100 7
200 5 1 1
200 5 1 2
200 4 1 3
200 2 1 5
200 2 1 8
300 5 2 4
200 4 1 6
300 4 1 4
300 2 2 1
200 3 1 2
400 3 1
200 1 1 4
200 4 1 5
200 3 1 6
200 1 1 8
200 3 1 9
400 3 3
200 1 1 11
300 4 2 9
300 3 1 7
200 3 1 9
400 1 3
300 1 3 3
300 3 2 1
400 7 0
400 1 0