제출 #773729

#제출 시각아이디문제언어결과실행 시간메모리
773729Ludissey게임 (IOI13_game)C++14
컴파일 에러
0 ms0 KiB
#include "game.h" #include <iostream> #include <string> #include <set> #include <map> #include <cstring> #include <unordered_map> #include <vector> #include <fstream> #include <bitset> #include <tuple > #include <cmath> #include <cstdint> #include <stack> #include <cassert> #include <cstdio> #include <queue> #include <iterator> #include <iomanip> #include <algorithm> #include <sstream> const int MAX_C = 100000; const int MAX_R = 100; int r, c; using namespace std; long long gcd2(long long X, long long Y) { long long tmp; while (X != Y && Y != 0) { tmp = X; X = Y; Y = tmp % Y; } return X; } struct node { node* left, * right; int gcd; void updates() { gcd = gcd2(left->gcd, right->gcd); } }; node* roots[MAX_R]; int query(node* root, int left, int right, int qLeft, int qRight) { if (left > qRight || right < qLeft) return 0; if (left >= qLeft && right <= qRight) return root->gcd; int mid = (left + right) / 2; return query(root->left, left, mid, qLeft, qRight) + query(root->right, mid + 1, right, qLeft, qRight); } void update_(node* root, int left, int right, int point, int nValue) { int qLeft, qRight; qLeft = qRight = point; if (left > qRight || right < qLeft) return; if (left >= qLeft && right <= qRight) { root->gcd = nValue; return; } int mid = (left + right) / 2; update_(root->left, left, mid, point, nValue); update_(root->right, mid + 1, right, point, nValue); root->updates(); } void build(node* root, int left, int right) { if (left == right) { root->gcd = 0; return; } int mid = (left + right) / 2; root->left = new node{ NULL, NULL, 0 }; root->right = new node{ NULL, NULL, 0 }; build(root->left, left, mid); build(root->right, mid + 1, right); root->updates(); } void destroy(node* root) { if (root->left) destroy(root->left); if (root->right) destroy(root->right); delete root; } void init(int R, int C) { r = R; c = C; for (int i = 0; i < C; i++) { roots[i] = new node{NULL, NULL, 0}; build(roots[i], 0, R - 1); } return; } void update(int P, int Q, long long K) { update_(roots[Q], 0, r - 1, P, K); } long long calculate(int P, int Q, int U, int V) { #define int long long int gcd = 0; for (int i = Q; i <= V; i++) { gcd = gcd2(query(roots[i], 0, r - 1, P, U),gcd); } return gcd; }

컴파일 시 표준 에러 (stderr) 메시지

game.cpp:11:10: fatal error: tuple : No such file or directory
   11 | #include <tuple >
      |          ^~~~~~~~
compilation terminated.