buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#coding:utf-8 #1_11_C class Dice: def __init__(self, ary): self.top, self.south, self.east, self.west, self.north, self.bottom = ary def roll_n(self): self.top, self.north, self.bottom, self.south = self.south, self.top, self.north, self.bottom def roll_e(self): self.top, self.eas...
#coding:utf-8 #1_11_C class Dice: def __init__(self, ary): self.top, self.south, self.east, self.west, self.north, self.bottom = ary def roll_n(self): self.top, self.north, self.bottom, self.south = self.south, self.top, self.north, self.bottom def roll_e(self): self.top, self.eas...
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
321
class Dice: def __init__(self,l1,l2,l3,l4,l5,l6): self.l1 = l1 self.l2 = l2 self.l3 = l3 self.l4 = l4 self.l5 = l5 self.l6 = l6 self.top = 1 self.front = 2 self.right = 3 def get_top(self): return eval("self." + 'l' + str(self.top)...
class Dice: def __init__(self,l1,l2,l3,l4,l5,l6): self.l1 = l1 self.l2 = l2 self.l3 = l3 self.l4 = l4 self.l5 = l5 self.l6 = l6 self.top = 1 self.front = 2 self.right = 3 def get_top(self): return eval("self." + 'l' + str(self.top)...
[["+", 15, 679, 12, 666, 0, 652, 3, 4, 0, 24], ["+", 15, 679, 12, 666, 0, 652, 3, 4, 0, 25]]
5
601
class Dice: def __init__(self): self.state =[1, 2, 3, 4, 5, 6] def setState(self, li): # [top, S, E, W, N, under] self.state = li def move(self, str_direction): if str_direction == "N": self.state = [self.state[1], self.state[5],self.state[2], ...
class Dice: def __init__(self): self.state =[1, 2, 3, 4, 5, 6] def setState(self, li): # [top, S, E, W, N, under] self.state = li def move(self, str_direction): if str_direction == "N": self.state = [self.state[1], self.state[5],self.state[2], ...
[["-", 0, 1, 0, 662, 12, 634, 0, 206, 206, 612], ["+", 0, 1, 0, 662, 12, 634, 0, 206, 206, 612]]
5
524
import random class Dice(object): def __init__(self): self.t = 1 self.s = 2 self.e = 3 self.w = 4 self.n = 5 self.b = 6 def __init__(self, faces): self.t = faces[0] self.s = faces[1] self.e = faces[2] self.w = faces[3] se...
import random class Dice(object): def __init__(self): self.t = 1 self.s = 2 self.e = 3 self.w = 4 self.n = 5 self.b = 6 def __init__(self, faces): self.t = faces[0] self.s = faces[1] self.e = faces[2] self.w = faces[3] se...
[["+", 0, 682, 8, 196, 0, 14, 54, 54, 0, 22], ["+", 0, 682, 8, 196, 0, 14, 54, 54, 0, 21]]
5
376
class Dice: def __init__(self, faces): self.faces = faces self.t = faces[0] self.s = faces[1] self.e = faces[2] self.w = faces[3] self.n = faces[4] self.b = faces[5] def roll(self, drct): t_ = self.t s_ = self.s e_ = self.e w_ = self.w n_ = self.n b_ = self.b if drct == 'S': self.t =...
class Dice: def __init__(self, faces): self.faces = faces self.t = faces[0] self.s = faces[1] self.e = faces[2] self.w = faces[3] self.n = faces[4] self.b = faces[5] def roll(self, drct): t_ = self.t s_ = self.s e_ = self.e w_ = self.w n_ = self.n b_ = self.b if drct == 'S': self.t =...
[["-", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 652, 3, 4, 0, 319, 500, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 319, 0, 131], ["-", 0, 1, 0, 652, 3, 4, 0, 319, 319, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
458
function Dice(labels) { this.top = labels[0]; this.back = labels[1]; this.right = labels[2]; this.left = labels[3]; this.front = labels[4]; this.bottom = labels[5]; }; Dice.prototype.turn = function(direction) { switch (direction) { case 'W': var tmp = this.left; this.left = this.top; this....
function Dice(labels) { this.top = labels[0]; this.back = labels[1]; this.right = labels[2]; this.left = labels[3]; this.front = labels[4]; this.bottom = labels[5]; }; Dice.prototype.turn = function(direction) { switch (direction) { case 'W': var tmp = this.left; this.left = this.top; this....
[["-", 0, 1, 0, 2, 3, 3, 0, 557, 0, 491], ["+", 0, 1, 0, 2, 3, 3, 0, 557, 0, 491]]
2
851
<?php $count = trim(fgets(STDIN)); $dice_1 = explode(" ", trim(fgets(STDIN))); $a_dice = array(); $upper_1 = $dice_1[0]; $side_1 = array($dice_1[2], $dice_1[1], $dice_1[3], $dice_1[4]); $bottom = $dice_1[5]; for($x=0;$x<($count-1);$x++) { $dice_2 = explode(" ", trim(fgets(STDIN))); array_push($a...
<?php $count = trim(fgets(STDIN)); $dice_1 = explode(" ", trim(fgets(STDIN))); $a_dice = array(); $upper_1 = $dice_1[0]; $side_1 = array($dice_1[2], $dice_1[1], $dice_1[3], $dice_1[4]); $bottom_1 = $dice_1[5]; for($x=0;$x<($count-1);$x++) { $dice_2 = explode(" ", trim(fgets(STDIN))); array_p...
[["-", 0, 493, 0, 1, 0, 11, 31, 606, 0, 141], ["+", 0, 493, 0, 1, 0, 11, 31, 606, 0, 141], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 612], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 612], ["-", 8, 57, 15, 23, 0, 16, 12, 16, 12, 612], ["+", 8, 57, 15, 23, 0, 16, 12, 16, 12, 612]]
6
507
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); boolean or = true; int n = sc.nextInt(); int[][] num = new int[n][6]; for (int j = 0; j < n; j++) { for (int i = 0; i < 6; i++) { num[j][i] = sc.nextInt(); ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); boolean or = true; int n = sc.nextInt(); int[][] num = new int[n][6]; for (int j = 0; j < n; j++) { for (int i = 0; i < 6; i++) { num[j][i] = sc.nextInt(); ...
[["+", 8, 498, 0, 195, 8, 196, 0, 57, 0, 95], ["+", 0, 195, 8, 196, 0, 57, 75, 196, 0, 45], ["+", 8, 196, 0, 57, 75, 196, 0, 57, 0, 95], ["+", 0, 57, 75, 196, 0, 57, 75, 196, 0, 45], ["+", 0, 57, 75, 196, 0, 57, 64, 196, 0, 46], ["+", 0, 57, 75, 196, 0, 57, 75, 196, 0, 46]]
3
929
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] dice1, dice2, dice3, dice4; dice1 = new int[10]; dice2 = new int[10]; dice3 = new int[10]; dice4 = new int[10]; int i, m; for (i = 0; i < 6; i++) { ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] dice1, dice2, dice3, dice4; dice1 = new int[10]; dice2 = new int[10]; dice3 = new int[10]; dice4 = new int[10]; int i, m; for (i = 0; i < 6; i++) { ...
[["-", 8, 196, 0, 1, 0, 11, 12, 504, 71, 499], ["+", 8, 196, 0, 1, 0, 11, 12, 504, 71, 499]]
3
1,153
import java.util.Scanner; /** * @author kawakami * */ class Main { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner as = new Scanner(System.in); int diceO[][]; int diceC[][]; int n = 0; int num1, num2; String str = ""; ...
import java.util.Scanner; /** * @author kawakami * */ class Main { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner as = new Scanner(System.in); int diceO[][]; int diceC[][]; int n = 0; int num1, num2; String str = ""; ...
[["-", 0, 1, 0, 11, 12, 227, 497, 505, 0, 22], ["+", 0, 1, 0, 11, 12, 227, 497, 505, 0, 499]]
3
822
#include <stdio.h> #include <string.h> void turn(int *DICE, char com); int main(void) { int i, j, q, top, front; int DICE1[6], DICE2[6]; char com[105]; for (i = 0; i < 6; i++) { scanf("%d", &DICE1[i]); } for (i = 0; i < 6; i++) { scanf("%d", &DICE2[i]); } top = DICE1[0]; front = DICE1[2]; ...
#include <stdio.h> #include <string.h> void turn(int *DICE, char com); int main(void) { int i, j, q, top, front; int DICE1[6], DICE2[6]; char com[105]; for (i = 0; i < 6; i++) { scanf("%d", &DICE1[i]); } for (i = 0; i < 6; i++) { scanf("%d", &DICE2[i]); } top = DICE1[0]; front = DICE1[1]; ...
[["-", 8, 9, 0, 1, 0, 11, 12, 69, 71, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 69, 71, 13], ["-", 0, 52, 15, 23, 0, 16, 31, 69, 71, 13], ["+", 0, 52, 15, 23, 0, 16, 31, 69, 71, 13], ["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
0
558
#include <algorithm> #include <cmath> #include <iostream> #include <stdio.h> #include <string> using namespace std; class dice { public: int num[6], tmp; void moveS() { tmp = num[0]; num[0] = num[4]; num[4] = num[5]; num[5] = num[1]; num[1] = tmp; } void moveN() { tmp = num[0]; num[0...
#include <algorithm> #include <cmath> #include <iostream> #include <stdio.h> #include <string> using namespace std; class dice { public: int num[6], tmp; void moveS() { tmp = num[0]; num[0] = num[4]; num[4] = num[5]; num[5] = num[1]; num[1] = tmp; } void moveN() { tmp = num[0]; num[0...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120]]
1
737
//???????????£?¨? class Dice { public: Dice(int top, int front, int right, int left, int back, int bottom); //?????????????????????(?????°??????) int get_top(); int get_front(); int get_right(); int get_left(); int get_back(); int get_bottom(); bool roll_topfront(int top, int front); void roll...
//???????????£?¨? class Dice { public: Dice(int top, int front, int right, int left, int back, int bottom); //?????????????????????(?????°??????) int get_top(); int get_front(); int get_right(); int get_left(); int get_back(); int get_bottom(); bool roll_topfront(int top, int front); void roll...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
1,172
#include <cstdio> using namespace std; class Dice { public: int face[6]; Dice() {} int roll(int a, int b, int c, int d) { int temp = face[a]; face[a] = face[b]; face[b] = face[c]; face[c] = face[d]; face[d] = temp; return 0; } int move(char c) { if (c == 'W') roll(0, 2, 5, 3...
#include <cstdio> using namespace std; class Dice { public: int face[6]; Dice() {} int roll(int a, int b, int c, int d) { int temp = face[a]; face[a] = face[b]; face[b] = face[c]; face[c] = face[d]; face[d] = temp; return 0; } int move(char c) { if (c == 'W') roll(0, 2, 5, 3...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13]]
1
697
#include <iostream> #include <string> #include <vector> using namespace std; class Dice { public: int num[6]; Dice(); Dice(int a, int b, int c, int d, int e, int f); void roll(char s); void mroll(string s); void chgnum(int a, int b, int c, int d, int e, int f); bool rolluf(int a, int b); }; Dice::Dice(...
#include <iostream> #include <string> #include <vector> using namespace std; class Dice { public: int num[6]; Dice(); Dice(int a, int b, int c, int d, int e, int f); void roll(char s); void mroll(string s); void chgnum(int a, int b, int c, int d, int e, int f); bool rolluf(int a, int b); }; Dice::Dice(...
[["-", 0, 2, 63, 118, 28, 69, 341, 342, 0, 13], ["+", 0, 2, 63, 118, 28, 69, 341, 342, 0, 22], ["+", 0, 7, 8, 9, 0, 7, 8, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46]]
1
1,096
#include <iostream> using namespace std; struct dice { int x[6]; void roll(char c) { int tmp; if (c == 'E') { tmp = x[0]; x[0] = x[3]; x[3] = x[5]; x[5] = x[2]; x[2] = tmp; } if (c == 'N') { tmp = x[0]; x[0] = x[1]; x[1] = x[5]; x[5] = x[4]; ...
#include <iostream> using namespace std; struct dice { int x[6]; void roll(char c) { int tmp; if (c == 'E') { tmp = x[0]; x[0] = x[3]; x[3] = x[5]; x[5] = x[2]; x[2] = tmp; } if (c == 'N') { tmp = x[0]; x[0] = x[1]; x[1] = x[5]; x[5] = x[4]; ...
[["-", 0, 7, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 7, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 7, 8, 9, 0, 7, 26, 27, 28, 22]]
1
776
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; public class Main { @SuppressWarnings("unchecked") public static void main(String[] args) { Scanner in = new Scanner(System.in); int V = in.nextInt(); int E = in.nextInt(); used = new boolean[V]; ...
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; public class Main { @SuppressWarnings("unchecked") public static void main(String[] args) { Scanner in = new Scanner(System.in); int V = in.nextInt(); int E = in.nextInt(); used = new boolean[V]; ...
[["-", 0, 1, 0, 11, 12, 227, 497, 505, 0, 22], ["+", 0, 1, 0, 11, 12, 227, 497, 505, 0, 22], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 12, 22], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 12, 22]]
3
492
#include <bits/stdc++.h> using namespace std; const int INF = 1e9 + 1; const int MAX_V = 575; // O(|E||V|^2) struct Edge { Edge(int _to, int _cap, int _rev) : to(_to), cap(_cap), rev(_rev) {} int to; int cap; // 容量 int rev; // 逆辺 }; vector<Edge> G[MAX_V]; // グラフの隣接リスト表現 int level[MAX_V]; // sからの距離 int it...
#include <bits/stdc++.h> using namespace std; const int INF = 1e9 + 1; const int MAX_V = 575; // O(|E||V|^2) struct Edge { Edge(int _to, int _cap, int _rev) : to(_to), cap(_cap), rev(_rev) {} int to; int cap; // 容量 int rev; // 逆辺 }; vector<Edge> G[MAX_V]; // グラフの隣接リスト表現 int level[MAX_V]; // sからの距離 int it...
[["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["-", 64, 9, 0, 1, 0, 11, 12, 91, 17, 33], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 110]]
1
592
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #inclu...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #includ...
[["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13]]
1
860
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #inclu...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #inclu...
[["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13]]
1
792
#include <algorithm> #include <deque> #include <functional> #include <iostream> #include <list> #include <numeric> #include <queue> #include <stack> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <bitset> #include <cstdlib> #include <iomanip> #include <map> #include <math.h> #include <set> using...
#include <algorithm> #include <deque> #include <functional> #include <iostream> #include <list> #include <numeric> #include <queue> #include <stack> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <bitset> #include <cstdlib> #include <iomanip> #include <map> #include <math.h> #include <set> using...
[["-", 0, 57, 75, 76, 0, 9, 0, 43, 39, 40]]
1
992
#include <algorithm> #include <deque> #include <functional> #include <iostream> #include <list> #include <numeric> #include <queue> #include <stack> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <bitset> #include <cstdlib> #include <iomanip> #include <map> #include <math.h> #include <set> using...
#include <algorithm> #include <deque> #include <functional> #include <iostream> #include <list> #include <numeric> #include <queue> #include <stack> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <bitset> #include <cstdlib> #include <iomanip> #include <map> #include <math.h> #include <set> using...
[["-", 28, 23, 0, 118, 28, 2, 63, 118, 17, 131], ["-", 28, 23, 0, 118, 28, 2, 63, 118, 119, 120], ["-", 28, 23, 0, 118, 28, 2, 3, 4, 0, 24], ["-", 28, 23, 0, 118, 28, 2, 3, 4, 0, 25], ["+", 28, 23, 0, 118, 28, 69, 341, 342, 0, 70], ["+", 28, 23, 0, 118, 28, 69, 341, 342, 0, 22], ["+", 28, 23, 0, 118, 28, 69, 341, 342, ...
1
879
#include <algorithm> #include <iostream> #include <vector> using namespace std; struct edge { int to, cap, rev; }; int V, E, used[109]; vector<edge> G[109]; void add_edge(int v1, int v2, int cap) { G[v1].push_back(edge{v2, cap, (int)G[v2].size()}); G[v2].push_back(edge{v1, cap, (int)G[v1].size() - 1}); } int rec(...
#include <algorithm> #include <iostream> #include <vector> using namespace std; struct edge { int to, cap, rev; }; int V, E, used[109]; vector<edge> G[109]; void add_edge(int v1, int v2, int cap) { G[v1].push_back(edge{v2, cap, (int)G[v2].size()}); G[v2].push_back(edge{v1, 0, (int)G[v1].size() - 1}); } int rec(in...
[["-", 0, 2, 3, 4, 0, 191, 51, 83, 0, 22], ["+", 0, 2, 3, 4, 0, 191, 51, 83, 0, 13], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]]
1
350
#include <algorithm> #include <iostream> #include <vector> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef pair<int, int> pii; const int INF = 0x3fffffff; class Flow { public: int N; vector<vector<int>> F, C, edge; Flow(int n, int e) : F(n, vector<int>(n)), C(n, vector<int>(...
#include <algorithm> #include <iostream> #include <vector> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef pair<int, int> pii; const int INF = 0x3fffffff; class Flow { public: int N; vector<vector<int>> F, C, edge; Flow(int n, int e) : F(n, vector<int>(n)), C(n, vector<int>(...
[["-", 0, 14, 0, 357, 0, 358, 0, 4, 0, 22], ["+", 0, 14, 0, 357, 0, 358, 0, 4, 0, 22]]
1
456
#include <algorithm> #include <queue> #include <stdio.h> #include <vector> using namespace std; const int D_MAX_V = 10000; struct D_wolf { int t, c, r; D_wolf() {} D_wolf(int t1, int c1, int r1) { t = t1; c = c1; r = r1; } }; vector<D_wolf> D_G[D_MAX_V]; int D_level[D_MAX_V]; int D_iter[D_MAX_V]; vo...
#include <algorithm> #include <queue> #include <stdio.h> #include <vector> using namespace std; const int D_MAX_V = 10000; struct D_wolf { int t, c, r; D_wolf() {} D_wolf(int t1, int c1, int r1) { t = t1; c = c1; r = r1; } }; vector<D_wolf> D_G[D_MAX_V]; int D_level[D_MAX_V]; int D_iter[D_MAX_V]; vo...
[["-", 31, 118, 28, 69, 341, 342, 0, 118, 119, 120], ["+", 31, 118, 28, 69, 341, 342, 0, 118, 119, 120]]
1
662
#include <algorithm> #include <iostream> #include <vector> #define REP(i, n) for (int i = 0; i < (n); i++) using namespace std; const int INF = 1e9; struct edge { int to, cap, rev; edge(int to, int cap, int rev) : to(to), cap(cap), rev(rev) {} }; int v, e; vector<vector<edge>> G; //??°???????????£??\???????????¨...
#include <algorithm> #include <iostream> #include <vector> #define REP(i, n) for (int i = 0; i < (n); i++) using namespace std; const int INF = 1e9; struct edge { int to, cap, rev; edge(int to, int cap, int rev) : to(to), cap(cap), rev(rev) {} }; int v, e; vector<vector<edge>> G; //??°???????????£??\???????????¨...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]]
1
407
// clang-format off #include <bits/stdc++.h> #define int long long #define main signed main() #define loop(i, a, n) for (int i = (a); i < (n); i++) #define rep(i, n) loop(i, 0, n) #define forever for (;;) #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define prec(n) fixed << setprecisio...
// clang-format off #include <bits/stdc++.h> #define int long long #define main signed main() #define loop(i, a, n) for (int i = (a); i < (n); i++) #define rep(i, n) loop(i, 0, n) #define forever for (;;) #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define prec(n) fixed << setprecisio...
[["+", 12, 2, 63, 118, 28, 69, 341, 342, 0, 70], ["+", 12, 2, 63, 118, 28, 69, 341, 342, 0, 22], ["+", 12, 2, 63, 118, 28, 69, 341, 342, 0, 73]]
1
1,069
#include <bits/stdc++.h> using namespace std; #define INF 1000000007 #define MAX_V 1000 struct edge { int to, cap, rev; }; vector<edge> G[MAX_V]; bool used[MAX_V]; void add_edge(int from, int to, int cap) { G[from].push_back((edge){to, cap, G[to].size()}); G[to].push_back((edge){from, 0, G[from].size() - 1}); }...
#include <bits/stdc++.h> using namespace std; #define INF 1000000007 #define MAX_V 1000 struct edge { int to, cap, rev; }; vector<edge> G[MAX_V]; bool used[MAX_V]; void add_edge(int from, int to, int cap) { G[from].push_back((edge){to, cap, G[to].size()}); G[to].push_back((edge){from, 0, G[from].size() - 1}); }...
[["+", 0, 57, 15, 339, 51, 16, 31, 91, 17, 111]]
1
379
#include <algorithm> #include <list> #include <stdio.h> #include <vector> using namespace std; typedef vector<int> VInt; typedef vector<VInt> VVInt; typedef list<int> LInt; typedef vector<LInt> VLInt; typedef LInt::iterator LIter; typedef vector<LIter> VLIter; // Input: the network int n, src, dest; VVInt c; // Out...
#include <algorithm> #include <list> #include <stdio.h> #include <vector> using namespace std; typedef vector<int> VInt; typedef vector<VInt> VVInt; typedef list<int> LInt; typedef vector<LInt> VLInt; typedef LInt::iterator LIter; typedef vector<LIter> VLIter; // Input: the network int n, src, dest; VVInt c; // Out...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
796
#include <algorithm> #include <fstream> #include <iostream> #include <list> #include <vector> using namespace std; void lift(int u, vector<int> &e, vector<list<int>> &nei, vector<vector<int>> &c, vector<vector<int>> &f, vector<int> &h, int n) { int height = 2 * n; for (auto it = nei[u].begin(); it != nei...
#include <algorithm> #include <fstream> #include <iostream> #include <list> #include <vector> using namespace std; void lift(int u, vector<int> &e, vector<list<int>> &nei, vector<vector<int>> &c, vector<vector<int>> &f, vector<int> &h, int n) { int height = 2 * n; for (auto it = nei[u].begin(); it != nei...
[["-", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
905
/* Дан неориентированный связный граф. * Требуется найти вес минимального остовного дерева в этом графе с помощью * алгоритма Борувки.*/ // T(N, M) = O(|E|log|V|) // M(N, M) = O(|V| + |E|) #include <bits/stdc++.h> using namespace std; const int INF = 2000000000; // константа, отвечающая за "бесконечность". typedef u...
/* Дан неориентированный связный граф. * Требуется найти вес минимального остовного дерева в этом графе с помощью * алгоритма Борувки.*/ // T(N, M) = O(|E|log|V|) // M(N, M) = O(|V| + |E|) #include <bits/stdc++.h> using namespace std; const int INF = 2000000000; // константа, отвечающая за "бесконечность". typedef u...
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
1,409
'use.strict'; (function(stdin) { var inputs = stdin.toString(); var x = inputs.trim().sprit('\n').map(Number)[0]; console.log(Math.pow(x, 3)); }(require('fs').readFileSync('/dev/stdin', 'utf8')));
'use strict'; (function(stdin) { var inputs = stdin.toString(); var x = inputs.trim().split('\n').map(Number)[0]; console.log(Math.pow(x, 3)); }(require('fs').readFileSync('/dev/stdin', 'utf8')));
[["-", 36, 36, 0, 493, 0, 1, 0, 557, 0, 491], ["+", 36, 36, 0, 493, 0, 1, 0, 557, 0, 491], ["-", 500, 2, 63, 558, 500, 2, 63, 558, 559, 560], ["+", 500, 2, 63, 558, 500, 2, 63, 558, 559, 560]]
2
79
'use strict'; (function(stdin) { var inputs = stdin.toString().trim().split('\n'); (function(x) { // ???????????????????????? consol.log(Math.pow(x, 3)); })(parseInt(inputs[0], 10)); // ??°????????? }(require('fs').readFileSync('/dev/stdin', 'utf8')));
'use strict'; (function(stdin) { var inputs = stdin.toString().trim().split('\n'); (function(x) { // ???????????????????????? console.log(Math.pow(x, 3)); })(parseInt(inputs[0], 10)); // ??°????????? }(require('fs').readFileSync('/dev/stdin', 'utf8')));
[["-", 8, 556, 0, 1, 0, 2, 63, 558, 500, 22], ["+", 8, 556, 0, 1, 0, 2, 63, 558, 500, 22]]
2
88
var x = require('fs').readFileSync('/dev/stdin', 'utf8'); console.log(x);
var x = require('fs').readFileSync('/dev/stdin', 'utf8'); console.log(x * x * x);
[["+", 0, 2, 3, 3, 0, 16, 31, 16, 17, 48], ["+", 0, 2, 3, 3, 0, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 2, 3, 3, 0, 16, 17, 48], ["+", 0, 1, 0, 2, 3, 3, 0, 16, 12, 22]]
2
28
<?php $x = (int)trim(fgets(STDIN)); echo $x*$x*$x+"\n"; ?>
<?php $x = (int)trim(fgets(STDIN)); echo $x*$x*$x."\n"; ?>
[["-", 36, 36, 0, 493, 0, 608, 0, 16, 17, 72], ["+", 36, 36, 0, 493, 0, 608, 0, 16, 17, 131]]
6
30
<?php $i = trim(fgets(STDIN)); $s = $i*$i*$i; echo '$s \n'; ?>
<?php $i = trim(fgets(STDIN)); $s = $i*$i*$i; echo $s; ?>
[["-", 36, 36, 0, 493, 0, 608, 0, 557, 0, 104], ["-", 36, 36, 0, 493, 0, 608, 0, 557, 0, 610], ["+", 36, 36, 0, 493, 0, 608, 0, 606, 0, 607], ["+", 36, 36, 0, 493, 0, 608, 0, 606, 0, 141]]
6
30
$input=trim(fgets(STDIN)); print pow($input,3);
<?php $input=trim(fgets(STDIN)); print pow($input,3); ?>
[["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605], ["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 611]]
6
20
<?php $input = fgets(FTDIN); print pow($input,3); ?>
<?php $input=fgets(STDIN); print pow($input,3); ?>
[["-", 0, 11, 12, 613, 3, 3, 0, 28, 0, 141], ["+", 0, 11, 12, 613, 3, 3, 0, 28, 0, 141]]
6
19
<? $stdn = trim(fgets(STDN)); $ans = $stdn * $stdn * $stdn; echo $ans . "\n";
<?php $stdn = trim(fgets(STDIN)); $ans = $stdn * $stdn * $stdn; echo $ans . "\n";
[["-", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605], ["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605], ["-", 0, 28, 0, 613, 3, 3, 0, 28, 0, 141], ["+", 0, 28, 0, 613, 3, 3, 0, 28, 0, 141]]
6
32
<? echo php pow(trim(fgets(STDIN)), 3), PHP_EOL;
<?php echo pow(trim(fgets(STDIN)), 3), PHP_EOL;
[["-", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605], ["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605], ["-", 36, 36, 0, 493, 0, 608, 0, 42, 0, 141]]
6
18
$in = trim(fgets(STDIN)); echo $in * $in * $in . "\n";
<?php $in = trim(fgets(STDIN)); echo $in * $in * $in . "\n";
[["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605]]
6
25
<?php $x = trim(fgets(STDIN)); pow($x,3)."\n";
<?php $x = trim(fgets(STDIN)); echo pow($x,3)."\n";
[["+", 36, 36, 36, 36, 0, 493, 0, 608, 0, 621]]
6
24
fscanf(STDIN,'%d',$n); printf("%d\n",$n*$n*$n);
<?php fscanf(STDIN,'%d',$n); printf("%d\n",$n*$n*$n);
[["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605]]
6
29
<?php $x = trim(fgets(STDIN)); echo $x^3; ?>
<?php $x = trim(fgets(STDIN)); echo $x**3; ?>
[["-", 36, 36, 0, 493, 0, 608, 0, 16, 17, 140], ["+", 36, 36, 0, 493, 0, 608, 0, 624, 0, 578]]
6
19
<?php $x = trim (fgets(STDIM)); $ans = $x * $x * $x; echo $ans; ?>
<?php $x = trim(fgets(STDIN)); $ans = $x * $x * $x; echo $ans ; ?>
[["-", 0, 28, 0, 613, 3, 3, 0, 28, 0, 141], ["+", 0, 28, 0, 613, 3, 3, 0, 28, 0, 141]]
6
29
<?php $line=fgets(STDIN); echo $line * $line; ?>
<?php $line=fgets(STDIN); echo $line * $line * $line; ?>
[["+", 36, 36, 0, 493, 0, 608, 0, 16, 17, 48], ["+", 0, 493, 0, 608, 0, 16, 12, 606, 0, 607], ["+", 0, 493, 0, 608, 0, 16, 12, 606, 0, 141]]
6
17
<?php $stdin = trim(fgets(STDIN)); $result = pow(stdin, 3); echo $result; ?>
<?php $stdin = trim(fgets(STDIN)); $result = pow($stdin, 3); echo $result; ?>
[["+", 12, 613, 3, 3, 0, 28, 0, 606, 0, 607]]
6
27
<?php $x = trim(fgets(STDIN)); $x = (int)$x; $x = $x * $x * $x; echo $x + "\n"; ?>
<?php $x = trim(fgets(STDIN)); $x = (int)$x; $x = $x * $x * $x; echo "$x\n"; ?>
[["+", 36, 36, 0, 493, 0, 608, 0, 609, 0, 62], ["-", 36, 36, 0, 493, 0, 608, 0, 16, 17, 72], ["-", 0, 493, 0, 608, 0, 16, 12, 609, 0, 62]]
6
42
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); System.out.println(a ^ 3); } }
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); System.out.println(x * x * x); } }
[["-", 0, 195, 8, 196, 0, 503, 49, 200, 141, 22], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 141, 22], ["-", 0, 1, 0, 492, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 492, 3, 4, 0, 16, 17, 140], ["-", 0, 1, 0, 492, 3, 4, 0, 16, 12, 499], ["+", 0, 492, 3, 4, 0, 16, 31, 16, 31, 22], ["+", 0, 492, 3, 4, 0, 16, 31, 16, 17, 48], ["+",...
3
54
import java.util.*; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int uhouho = scan.nextInt(); System.out.println(uhouho * uhouho); } }
import java.util.*; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int uhouho = scan.nextInt(); System.out.println(uhouho * uhouho * uhouho); } }
[["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 48], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 12, 22]]
3
54
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int x = scan.nextInt(); System.out.println((int)Math.pow(x, x)); scan.close(); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int x = scan.nextInt(); System.out.println((int)Math.pow(x, 3)); scan.close(); } }
[["-", 3, 4, 0, 74, 51, 492, 3, 4, 0, 22], ["+", 3, 4, 0, 74, 51, 492, 3, 4, 0, 499]]
3
69
class Dice def initialize() # top bottom N E S W @number = gets.split.map(&:to_i) @dice_number = [1, 6, 5, 3, 2, 4] end def rotate(command) swap_number = [] case command when 'N' swap_number = [2, 1, 4] swap(swap_number) when 'E' swap_number = [3, 1, 5] swap(swap_number) when 'S' sw...
class Dice def initialize() # top bottom N E S W @number = gets.split.map(&:to_i) @dice_number = [1, 6, 5, 3, 2, 4] end def rotate(command) swap_number = [] case command when 'N' swap_number = [2, 1, 4] swap(swap_number) when 'E' swap_number = [3, 1, 5] swap(swap_number) when 'S' sw...
[["-", 0, 652, 196, 737, 8, 736, 0, 652, 735, 22], ["-", 8, 736, 0, 652, 3, 4, 0, 557, 0, 62], ["-", 8, 736, 0, 652, 3, 4, 0, 557, 0, 6]]
4
450
def check(x, y) 2.times do |z| 4.times do return true if x == y a, b, c, d, e, f = x x = z.zero? ? [e, a, c, d, f, b] : [d, b, a, f, e, c] c = x 4.times do i, j, k, l, m, n = c c = [i, k, m, j, l, n] return true if c == y end end end false end ...
def check(x, y) 2.times do |z| 4.times do return true if x == y a, b, c, d, e, f = x x = z.zero? ? [e, a, c, d, f, b] : [d, b, a, f, e, c] c = x 4.times do i, j, k, l, m, n = c c = [i, k, m, j, l, n] return true if c == y end end end false end ...
[["+", 12, 652, 486, 652, 486, 652, 3, 4, 0, 24], ["+", 486, 652, 486, 652, 3, 4, 0, 557, 0, 62], ["+", 486, 652, 486, 652, 3, 4, 0, 557, 0, 44], ["+", 12, 652, 486, 652, 486, 652, 3, 4, 0, 25]]
4
188
from enum import Enum import sys import math #0:中央,1:南,2:東,3:西,4:北,5:裏側 class Dice(): def __init__(self): self.number = [i for i in range(6)] self.work = [i for i in range(6)] self.order = 'NNNNWNNNWNNNENNNENNNWNNN' def setNumber(self,n0,n1,n2,n3,n4,n5): self.number[0] = n0 ...
from enum import Enum import sys import math #0:中央,1:南,2:東,3:西,4:北,5:裏側 class Dice(): def __init__(self): self.number = [i for i in range(6)] self.work = [i for i in range(6)] self.order = 'NNNNWNNNWNNNENNNENNNWNNN' def setNumber(self,n0,n1,n2,n3,n4,n5): self.number[0] = n0 ...
[["-", 15, 666, 0, 652, 63, 319, 500, 206, 51, 22], ["+", 15, 666, 0, 652, 63, 319, 500, 206, 51, 22], ["-", 15, 666, 0, 652, 3, 4, 0, 206, 51, 22], ["+", 15, 666, 0, 652, 3, 4, 0, 206, 51, 22]]
5
716
class Dice(): def __init__(self): self.number = [_ for _ in range(6)] self.work = [_ for _ in range(6)] self.order = "NNNNWNNNWNNNENNNENNNWNNN" def setNumber(self,n0,n1,n2,n3,n4,n5): self.number[0] = n0 self.number[1] = n1 self.number[2] = n2 self.number[3] = n3 self.number[4] = n4 self.number[5] = ...
class Dice(): def __init__(self): self.number = [_ for _ in range(6)] self.work = [_ for _ in range(6)] self.order = "NNNNWNNNWNNNENNNENNNWNNN" def setNumber(self,n0,n1,n2,n3,n4,n5): self.number[0] = n0 self.number[1] = n1 self.number[2] = n2 self.number[3] = n3 self.number[4] = n4 self.number[5] = ...
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22]]
5
1,165
class Dice: def __init__(self, data): self.data = data def __eq__(self, value): for i in range(4): if self.data[0] == value.data[0]: for j in range(4): if self.data == value.data: return True ...
class Dice: def __init__(self, data): self.data = data def __eq__(self, value): for i in range(4): if self.data[0] == value.data[0]: for j in range(4): if self.data == value.data: return True ...
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
548
class Dice: def __init__(self, faces): self.faces = tuple(faces) def roll_north(self): self.faces = (self.faces[1], self.faces[5], self.faces[2], self.faces[3], self.faces[0], self.faces[4]) def roll_south(self): self.faces = (self.faces[4], self.faces[0], se...
class Dice: def __init__(self, faces): self.faces = tuple(faces) def roll_north(self): self.faces = (self.faces[1], self.faces[5], self.faces[2], self.faces[3], self.faces[0], self.faces[4]) def roll_south(self): self.faces = (self.faces[4], self.faces[0], se...
[["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
512
class Dice(): def __init__(self, label): self.label = label def north(self): self.change([2, 6, 3, 4, 1, 5]) def west(self): self.change([3, 2, 6, 1, 5, 4]) def east(self): self.change([4, 2, 1, 6, 5, 3]) def south(self): self.change([5, 1, 3, 4, 6, 2]) ...
class Dice(): def __init__(self, label): self.label = label def north(self): self.change([2, 6, 3, 4, 1, 5]) def west(self): self.change([3, 2, 6, 1, 5, 4]) def east(self): self.change([4, 2, 1, 6, 5, 3]) def south(self): self.change([5, 1, 3, 4, 6, 2]) ...
[["+", 0, 57, 15, 652, 3, 4, 0, 319, 0, 131], ["+", 0, 57, 15, 652, 3, 4, 0, 319, 319, 22]]
5
356
class Dice(object): """Dice Class """ def __init__(self, numbers): """ Args: numbers: """ self.numbers_inverse = {numbers[0]: 1, numbers[1]: 2, numbers[2]: 3, numbers[3]: 4, numbers[4]: 5, numbers[5]: 6} self.numbers = {1...
class Dice(object): """Dice Class """ def __init__(self, numbers): """ Args: numbers: """ self.numbers_inverse = {numbers[0]: 1, numbers[1]: 2, numbers[2]: 3, numbers[3]: 4, numbers[4]: 5, numbers[5]: 6} self.numbers = {1...
[["-", 8, 196, 0, 57, 75, 665, 15, 666, 667, 60], ["+", 8, 196, 0, 57, 75, 665, 15, 666, 667, 79]]
5
924
n = int(input()) dice = [[0 for i in range(6)] for j in range(n)] for i in range(n): dice[i] = list(map(int, input().split())) def rolling(inst, dice): if inst == 'E': dice[5], dice[2], dice[0], dice[3] = dice[2], dice[0], dice[3], dice[5] elif inst == 'W': dice[5], dice[3], dice[0], dice...
n = int(input()) dice = [[0 for i in range(6)] for j in range(n)] for i in range(n): dice[i] = list(map(int, input().split())) def rolling(inst, dice): if inst == 'E': dice[5], dice[2], dice[0], dice[3] = dice[2], dice[0], dice[3], dice[5] elif inst == 'W': dice[5], dice[3], dice[0], dice...
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
447
n=int(input()) class dice(object): def __init__(self, d): self.d = d def roll(self,com): a1,a2,a3,a4,a5,a6=self.d if com=="E": self.d = [a4,a2,a1,a6,a5,a3] elif com=="W": self.d = [a3,a2,a6,a1,a5,a4] elif com=="S": self.d = [a5,a1,a3,a4,a6,a2] elif com=="N": self.d = [a2,a6,a3,a4,a1,a5] imp...
n=int(input()) class dice(object): def __init__(self, d): self.d = d def roll(self,com): a1,a2,a3,a4,a5,a6=self.d if com=="E": self.d = [a4,a2,a1,a6,a5,a3] elif com=="W": self.d = [a3,a2,a6,a1,a5,a4] elif com=="S": self.d = [a5,a1,a3,a4,a6,a2] elif com=="N": self.d = [a2,a6,a3,a4,a1,a5] imp...
[["-", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22], ["-", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 654], ["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 655], ["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117]]
5
316
n = int(input()) x = [[] for i in range(n)] for i in range(n): x[i] = list(map(int, input().split())) z = [[0, 1, 2, 3], [0, 2, 1, 1], [1, 0, 2, 1], [2, 0, 1, 0], [1, 2, 0, 0], [2, 1, 0, 1]] def compare(x, y): succeed = False for i in range(6): match = True order = [0, 0, 0] for j i...
n = int(input()) x = [[] for i in range(n)] for i in range(n): x[i] = list(map(int, input().split())) z = [[0, 1, 2, 3], [0, 2, 1, 1], [1, 0, 2, 1], [2, 0, 1, 0], [1, 2, 0, 0], [2, 1, 0, 1]] def compare(x, y): succeed = False for i in range(6): match = True order = [0, 0, 0] for j i...
[["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
390
import itertools class dice(): def __init__(self,number): self.number = number def korokoro(self,com): if com == 'E': self.number = [self.number[i] for i in [3,1,0,5,4,2]] if com == 'S': self.number = [self.number[i] for i in [4,0,2,3,5,1]] if com == 'N':...
import itertools class dice(): def __init__(self,number): self.number = number def korokoro(self,com): if com == 'E': self.number = [self.number[i] for i in [3,1,0,5,4,2]] if com == 'S': self.number = [self.number[i] for i in [4,0,2,3,5,1]] if com == 'N'...
[["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["-", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 8, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 8, 196, 0, 1, 0, 662, 12, 557, 0, 6]]
5
326
p = [(-1, 2, 4, 1, 3, -1), (3, -1, 0, 5, -1, 2), (1, 5, -1, -1, 0, 4), (4, 0, -1, -1, 5, 1), (2, -1, 5, 0, -1, 3), (-1, 3, 1, 4, 2, -1)] def is_equal(d, a): ts = [i for i, x in enumerate(d) if x == a[0]] fs = [i for i, x in enumerate(d) if x == a[1]] b = 0 for t in ts: for f in fs: if t == f: continu...
p = [(-1, 2, 4, 1, 3, -1), (3, -1, 0, 5, -1, 2), (1, 5, -1, -1, 0, 4), (4, 0, -1, -1, 5, 1), (2, -1, 5, 0, -1, 3), (-1, 3, 1, 4, 2, -1)] def is_equal(d, a): ts = [i for i, x in enumerate(d) if x == a[0]] fs = [i for i, x in enumerate(d) if x == a[1]] b = 0 for t in ts: for f in fs: if t == f: continu...
[["-", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 17, 107]]
5
337
def north(list): List = [] List.append(list[1]) List.append(list[5]) List.append(list[2]) List.append(list[3]) List.append(list[0]) List.append(list[4]) return List def west(list): List = [] List.append(list[2]) List.append(list[1]) List.append(list[5]) List.append(l...
def north(list): List = [] List.append(list[1]) List.append(list[5]) List.append(list[2]) List.append(list[3]) List.append(list[0]) List.append(list[4]) return List def west(list): List = [] List.append(list[2]) List.append(list[1]) List.append(list[5]) List.append(l...
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
504
package main import ( "fmt" ) type Dice struct { T, S, E, W, N, B int } func (p *Dice) roll(direction rune) { if direction == 'S' { p.S, p.B, p.N, p.T = p.T, p.S, p.B, p.N } else if direction == 'N' { p.N, p.B, p.S, p.T = p.T, p.N, p.B, p.S } else if direction == 'W' { p.W, p.B, p.E, p.T = p.T, p.W, p.B,...
package main import ( "fmt" ) type Dice struct { T, S, E, W, N, B int } func (p *Dice) roll(direction rune) { if direction == 'S' { p.S, p.B, p.N, p.T = p.T, p.S, p.B, p.N } else if direction == 'N' { p.N, p.B, p.S, p.T = p.T, p.N, p.B, p.S } else if direction == 'W' { p.W, p.B, p.E, p.T = p.T, p.W, p.B,...
[["-", 0, 7, 0, 430, 10, 431, 12, 432, 0, 433], ["+", 0, 430, 10, 431, 12, 432, 0, 16, 31, 22], ["+", 0, 430, 10, 431, 12, 432, 0, 16, 17, 72], ["+", 0, 430, 10, 431, 12, 432, 0, 16, 12, 433]]
7
565
'use strict'; process.stdin.on('data', function(chunk) { var lines = chunk.toString().split('\n'); var result = (function(data) { return Math.pow(data, 3); }(lines[0].map(Number))); console.log(result); }); process.stdin.resume(); process.stdin.setEncoding('utf8');
'use strict'; process.stdin.on('data', function(chunk) { var lines = chunk.toString().split('\n'); var result = (function(data) { return Math.pow(data, 3); }(parseInt(lines[0], 10))); console.log(result); }); process.stdin.resume(); process.stdin.setEncoding('utf8');
[["+", 51, 23, 0, 2, 3, 3, 0, 2, 63, 22], ["+", 0, 2, 3, 3, 0, 2, 3, 3, 0, 24], ["-", 0, 2, 3, 3, 0, 2, 63, 558, 0, 131], ["-", 0, 2, 3, 3, 0, 2, 63, 558, 559, 560], ["-", 0, 2, 3, 3, 0, 2, 3, 3, 0, 24], ["-", 0, 2, 3, 3, 0, 2, 3, 3, 0, 22], ["+", 0, 2, 3, 3, 0, 2, 3, 3, 0, 21], ["+", 0, 2, 3, 3, 0, 2, 3, 3, 0, 555]]
2
97
'use strict'; (function(stdin) { var inputs = stdin.toString().trim(); (function(x) { Math.pow(x, 3); }( parseInt(inputs, 10))); //????°??????????????¶?????????°????????? }(require('fs').readFileSync('/dev/stdin', 'utf8')));
'use strict'; (function(stdin) { var inputs = stdin.toString().trim(); (function(x) { console.log(Math.pow(x, 3)); }( parseInt(inputs, 10))); //????°??????????????¶?????????°????????? }(require('fs').readFileSync('/dev/stdin', 'utf8')));
[["+", 8, 556, 0, 1, 0, 2, 63, 558, 500, 22], ["+", 8, 556, 0, 1, 0, 2, 63, 558, 0, 131], ["+", 8, 556, 0, 1, 0, 2, 63, 558, 559, 560], ["+", 8, 556, 0, 1, 0, 2, 3, 3, 0, 24], ["+", 0, 2, 3, 3, 0, 2, 3, 3, 0, 25]]
2
72
(function(stdin) { var lines = stdin.toString().split('\n'); var x = parseInt(lines[0], 10); console.log(x * x * x); }(reqiore('fs').readFileSync('/dev/stdin', 'utf8')));
(function(stdin) { var lines = stdin.toString().split('\n'); var x = parseInt(lines[0], 10); console.log(x * x * x); }(require('fs').readFileSync('/dev/stdin', 'utf8')));
[["-", 3, 3, 0, 2, 63, 558, 500, 2, 63, 22], ["+", 3, 3, 0, 2, 63, 558, 500, 2, 63, 22]]
2
68
var calc = function(x) { return x * x * x; } process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on('data', function(x) { console.log(calc); });
var calc = function(x) { return x * x * x; } process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on('data', function(x) { console.log(calc(x)); });
[["+", 0, 2, 3, 3, 0, 2, 3, 3, 0, 24], ["+", 0, 2, 3, 3, 0, 2, 3, 3, 0, 22], ["+", 8, 556, 0, 1, 0, 2, 3, 3, 0, 25]]
2
60
process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on('data', function(chunk) { var x = chunk.toString().split('\n'); console.log(Math.pow(x, 3)); });
process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on('data', function(chunk) { var x = parseInt(chunk.toString().split('\n')); console.log(Math.pow(x, 3)); });
[["+", 8, 556, 0, 198, 0, 200, 51, 2, 63, 22], ["+", 0, 198, 0, 200, 51, 2, 3, 3, 0, 24], ["+", 51, 2, 3, 3, 0, 2, 3, 3, 0, 25]]
2
67
function main(input) { console.log(parseInt(input[0] ^ 3)); } var input = ''; process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on('data', function(chunk) { input += chunk; }); process.stdin.on('end', function() { input = input.split(' '); main(input); });
function main(input) { console.log(Math.pow(input[0], 3)); } var input = ''; process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on('data', function(chunk) { input += chunk; }); process.stdin.on('end', function() { input = input.split(' '); main(input); });
[["-", 0, 1, 0, 2, 3, 3, 0, 2, 63, 22], ["+", 0, 2, 3, 3, 0, 2, 63, 558, 500, 22], ["+", 0, 2, 3, 3, 0, 2, 63, 558, 0, 131], ["+", 0, 2, 3, 3, 0, 2, 63, 558, 559, 560], ["-", 3, 3, 0, 2, 3, 3, 0, 16, 17, 140], ["+", 0, 2, 3, 3, 0, 2, 3, 3, 0, 21]]
2
102
'use strict'; (function(stdin) { var inputs = stdin.toString(); (function(x) { //???????????????????????? console.log(Math, pow(x, 3)); }(parseInt(inputs.trim(), 10))); //????°??????????????¶?????????°????????? }(require('fs').readFileSync('/dev/stdin', 'utf8')));
'use strict'; (function(stdin) { var inputs = stdin.toString(); (function(x) { //???????????????????????? console.log(Math.pow(x, 3)); }(parseInt(inputs.trim(), 10))); //????°??????????????¶?????????°????????? }(require('fs').readFileSync('/dev/stdin', 'utf8')));
[["-", 8, 556, 0, 1, 0, 2, 3, 3, 0, 21], ["+", 0, 2, 3, 3, 0, 2, 63, 558, 0, 131]]
2
78
var input = require('fs').readFileSync('/dev/stdin', 'utf8') var x = parseInt(input) console.log(x * x)
var input = require('fs').readFileSync('/dev/stdin', 'utf8') var x = parseInt(input) console.log(x * x * x)
[["+", 0, 1, 0, 2, 3, 3, 0, 16, 17, 48], ["+", 0, 1, 0, 2, 3, 3, 0, 16, 12, 22]]
2
35
'use strict'; process.stdin.on('data', function(chunk) { var inputs = chunk.toString(); var x = Number(inputs); // ???????????????????????? console.log(math.power(x, 3)); }); process.stdin.resume(); process.stdin.setEncoding('utf8');
'use strict'; process.stdin.on('data', function(chunk) { var inputs = chunk.toString(); var x = Number(inputs); // ???????????????????????? console.log(Math.pow(x, 3)); }); process.stdin.resume(); process.stdin.setEncoding('utf8');
[["-", 0, 2, 3, 3, 0, 2, 63, 558, 500, 22], ["+", 0, 2, 3, 3, 0, 2, 63, 558, 500, 22], ["-", 0, 2, 3, 3, 0, 2, 63, 558, 559, 560], ["+", 0, 2, 3, 3, 0, 2, 63, 558, 559, 560]]
2
73
process.stdin.resume(); process.stdin.setEncoding('utf-8'); process.stdin.on('date', function(chunk) { console.log(Math.pow(chunk, 3)); });
process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on('data', function(chunk) { console.log(Math.pow(chunk, 3)); });
[["-", 0, 1, 0, 2, 3, 3, 0, 557, 0, 491], ["+", 0, 1, 0, 2, 3, 3, 0, 557, 0, 491]]
2
51
#include <stdio.h> /*構造体*/ typedef struct dice { int Upper; int South; int East; int West; int North; int Under; } Dice; /*関数*/ //構造体を初期化する Dice InitDice(void); //さいころの構造体に値を入力する Dice InputDiceNum(void); //要素を入れ替える Dice RotateDice(Dice dice); Dice ChangeNum_East(Dice dice); Dice ChangeNum_South(Dice dice)...
#include <stdio.h> /*構造体*/ typedef struct dice { int Upper; int South; int East; int West; int North; int Under; } Dice; /*関数*/ //構造体を初期化する Dice InitDice(void); //さいころの構造体に値を入力する Dice InputDiceNum(void); //要素を入れ替える Dice RotateDice(Dice dice); Dice ChangeNum_East(Dice dice); Dice ChangeNum_South(Dice dice)...
[["-", 8, 9, 0, 1, 0, 11, 31, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 11, 31, 118, 119, 120]]
0
914
#include <stdio.h> typedef struct Dice { int t, s, e, w, n, b; } dice; void koro(dice *d, char *h); void koro_to_ewn(dice *di_kijun, dice *di_tmp); void hikaku(dice *di, dice *di_kijun); int check(dice *di_kijun, dice *di_check); int hante = 0; int main(void) { dice di_kijun, di; int n, i, j, dice[101][7]; sc...
#include <stdio.h> typedef struct Dice { int t, s, e, w, n, b; } dice; void koro(dice *d, char *h); void koro_to_ewn(dice *di_kijun, dice *di_tmp); void hikaku(dice *di, dice *di_kijun); int check(dice *di_kijun, dice *di_check); int hante = 0; int main(void) { dice di_kijun, di; int n, i, j, dice[101][7]; sc...
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19]]
0
1,259
// // main.c // aojdice2 // // Created by 15mac-08 on 2017/05/18. // Copyright ?? 2017??´ 15mac-08. All rights reserved. // #include <stdio.h> int main(int argc, const char *argv[]) { int dice[24][6] = { {2, 6, 3, 4, 1, 5}, {6, 5, 3, 4, 2, 1}, {5, 1, 3, 4, 6, 2}, {4, 1, 5, 2, 6, 3}, {6, 4, 5, 2, 3,...
// // main.c // aojdice2 // // Created by 15mac-08 on 2017/05/18. // Copyright ?? 2017??´ 15mac-08. All rights reserved. // #include <stdio.h> int main(int argc, const char *argv[]) { int dice[24][6] = { {2, 6, 3, 4, 1, 5}, {6, 5, 3, 4, 2, 1}, {5, 1, 3, 4, 6, 2}, {4, 1, 5, 2, 6, 3}, {6, 4, 5, 2, 3,...
[["+", 8, 9, 0, 7, 10, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 10, 11, 12, 16, 12, 13]]
0
583
#include <stdio.h> #include <string.h> int main(void) { int f = 0, i, o, j, l, z, q, k[6], s[100][6], n[6], n2[6]; char c; scanf("%d", &q); for (z = 0; z < q; z++) { for (i = 0; i < 6; i++) { scanf("%d", &s[z][i]); n[i] = i; } } for (i = 0; i < q; i++) { for (z = 0; z < q; z++) { ...
#include <stdio.h> #include <string.h> int main(void) { int f = 0, i, o, j, l, z, q, k[6], s[100][6], n[6], n2[6]; char c; scanf("%d", &q); for (z = 0; z < q; z++) { for (i = 0; i < 6; i++) { scanf("%d", &s[z][i]); n[i] = i; } } for (i = 0; i < q; i++) { for (z = 0; z < q; z++) { ...
[["-", 0, 57, 64, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 13]]
0
422
#include <stdio.h> #include <string.h> //ここmainやない char str[110]; //処理用 int i, j, k, l, m, n, e, s, w; int a[105][7], b[105][7]; int tmp; //入力関数 void input() { scanf("%d", &n); //個数 入力 for (j = 0; j < n; j++) { //個数分だけ for (i = 0; i < 6; i++) { //面の数の入力 0~5 scanf("%d", &a[j][i + 1]); //[1] ~ [6...
#include <stdio.h> #include <string.h> //ここmainやない char str[110]; //処理用 int i, j, k, l, m, n, e, s, w; int a[105][7], b[105][7]; int tmp; //入力関数 void input() { scanf("%d", &n); //個数 入力 for (j = 0; j < n; j++) { //個数分だけ for (i = 0; i < 6; i++) { //面の数の入力 0~5 scanf("%d", &a[j][i + 1]); //[1] ~ [6...
[["-", 0, 57, 64, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 7, 10, 11, 12, 13]]
0
1,393
#include <stdio.h> int main(void) { int dice[101][6], subdice[6], i, j, k, l, n, a[6], b[6], subA, subB; scanf("%d", &n); for (i = 0; i < n; i++) for (j = 0; j < 6; j++) scanf("%d", &dice[i][j]); for (i = 0; i < n; i++) { for (j = i + 1; j < n; j++) { if (dice[i][0] == dice[j][0]) ...
#include <stdio.h> int main(void) { int dice[101][6], subdice[6], i, j, k, l, n, a[6], b[6], subA, subB; scanf("%d", &n); for (i = 0; i < n; i++) for (j = 0; j < 6; j++) scanf("%d", &dice[i][j]); for (i = 0; i < n; i++) { for (j = i + 1; j < n; j++) { if (dice[i][0] == dice[j][0]) ...
[["-", 31, 16, 31, 16, 31, 16, 12, 69, 71, 13], ["+", 31, 16, 31, 16, 31, 16, 12, 69, 71, 13]]
0
747
#include <stdio.h> int func(); int main() { int dice[100][6]; int n; int i, j; int flag = 1; scanf("%d", &n); for (i = 0; i < n; i++) for (j = 0; j < 6; j++) scanf("%d", &dice[i][j]); for (i = 0; i < n; i++) { flag = func(dice[0], dice[i]); if (flag) { printf("No\n"); retu...
#include <stdio.h> int func(); int main() { int dice[100][6]; int n; int i, j; int flag = 1; scanf("%d", &n); for (i = 0; i < n; i++) for (j = 0; j < 6; j++) scanf("%d", &dice[i][j]); for (i = 1; i < n; i++) { flag = func(dice[0], dice[i]); if (flag) { printf("No\n"); retu...
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
0
515
#include <iostream> #include <vector> using namespace std; class Dice { public: const static int NUM_S = 6; int a[NUM_S]; Dice(void) {} void set(int _a[]) { a[0] = _a[0]; a[1] = _a[1]; a[2] = _a[2]; a[3] = _a[3]; a[4] = _a[4]; a[5] = _a[5]; } bool isEqual(Dice &o) { return ...
#include <iostream> #include <vector> using namespace std; class Dice { public: const static int NUM_S = 6; int a[NUM_S]; Dice(void) {} void set(int _a[]) { a[0] = _a[0]; a[1] = _a[1]; a[2] = _a[2]; a[3] = _a[3]; a[4] = _a[4]; a[5] = _a[5]; } bool isEqual(Dice &o) { return ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13]]
1
932
#include <iostream> #include <vector> using namespace std; class Dice { public: int dice[6]; void move(char c) { int tmp; switch (c) { case ('S'): tmp = dice[5]; dice[5] = dice[1]; dice[1] = dice[0]; dice[0] = dice[4]; dice[4] = tmp; break; case ('N'): tm...
#include <iostream> #include <vector> using namespace std; class Dice { public: int dice[6]; void move(char c) { int tmp; switch (c) { case ('S'): tmp = dice[5]; dice[5] = dice[1]; dice[1] = dice[0]; dice[0] = dice[4]; dice[4] = tmp; break; case ('N'): tm...
[["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72]]
1
622
#include <iostream> #include <vector> using namespace std; // http://www.prefield.com/algorithm/misc/dice.html enum FACE { TOP, BOTTOM, FRONT, BACK, LEFT, RIGHT }; class dice { public: dice() { id[TOP] = 1; id[FRONT] = 2; id[LEFT] = 3; id[RIGHT] = 4; id[BACK] = 5; id[BOTTOM] = 6; } dice(i...
#include <iostream> #include <vector> using namespace std; // http://www.prefield.com/algorithm/misc/dice.html enum FACE { TOP, BOTTOM, FRONT, BACK, LEFT, RIGHT }; class dice { public: dice() { id[TOP] = 1; id[FRONT] = 2; id[LEFT] = 3; id[RIGHT] = 4; id[BACK] = 5; id[BOTTOM] = 6; } dice(i...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
669
#include <iostream> #include <sstream> using namespace std; class Dice { public: static int rollingface[][4]; static int sideface[][4]; int face[6]; Dice(string &face_data); // ~Dice(); void roll(const char &op); int top(); int front_face(int top, int right); void print_faces(); bool operator==(co...
#include <iostream> #include <sstream> using namespace std; class Dice { public: static int rollingface[][4]; static int sideface[][4]; int face[6]; Dice(string &face_data); // ~Dice(); void roll(const char &op); int top(); int front_face(int top, int right); void print_faces(); bool operator==(co...
[["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 57, 64, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 57, 64, 9, 0, 7, 8, 9, 0, 46]]
1
932
#include <stdio.h> int main() { int vector[3][4] = {{0, 2, 5, 3}, {0, 1, 5, 4}, {1, 2, 4, 3}}; int ii, i, j, k, l, m, n, c, cc = 0; scanf("%d", &n); int dice[2][6]; for (i = 0; i < n; i++) { for (j = 0; j < 6; j++) { scanf("%d", &dice[i][j]); } } // for(i=0;i<n;i++)printf("dice[%d] : %d %d %...
#include <stdio.h> int main() { int vector[3][4] = {{0, 2, 5, 3}, {0, 1, 5, 4}, {1, 2, 4, 3}}; int ii, i, j, k, l, m, n, c, cc = 0; scanf("%d", &n); int dice[n][6]; for (i = 0; i < n; i++) { for (j = 0; j < 6; j++) { scanf("%d", &dice[i][j]); } } // for(i=0;i<n;i++)printf("dice[%d] : %d %d %...
[["-", 8, 9, 0, 43, 49, 80, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 80, 49, 80, 81, 22]]
1
525
//#define _USE_MATH_DEFINES #include <iostream> //#include <stdio.h> //#include <iomanip> #include <vector> //#include <string> //#include <algorithm> //#include <functional> //#include <cmath> using namespace std; class Dice { public: Dice(int num[6]); int check_R(int t, int f); int check_same(Dice d); int T...
//#define _USE_MATH_DEFINES #include <iostream> //#include <stdio.h> //#include <iomanip> #include <vector> //#include <string> //#include <algorithm> //#include <functional> //#include <cmath> using namespace std; class Dice { public: Dice(int num[6]); int check_R(int t, int f); int check_same(Dice d); int T...
[["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13], ["-", 64, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 64, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 13], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 31, 22],...
1
645
#include <iostream> using namespace std; class Dice { public: static const int SURFACE_NUM = 6; // ?????????????????¢??° static const int DIR_NUM = 4; // ?????¢?????????????????° static const int ROUND_NUM = 4; // ?????¢????????¢?????° enum DIR { N, W, S, E }; // ?????¢?????? private: static ...
#include <iostream> using namespace std; class Dice { public: static const int SURFACE_NUM = 6; // ?????????????????¢??° static const int DIR_NUM = 4; // ?????¢?????????????????° static const int ROUND_NUM = 4; // ?????¢????????¢?????° enum DIR { N, W, S, E }; // ?????¢?????? private: static ...
[["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46]]
1
870
#include <iostream> #include <vector> using namespace std; class Dice { public: long r[6]; Dice(){}; void roll(long a, long b, long c, long d) { swap(r[a], r[b]); swap(r[b], r[c]); swap(r[c], r[d]); } void spinW() { roll(0, 2, 5, 3); } void spinN() { roll(0, 1, 5, 4); } }; int main() { int a...
#include <iostream> #include <vector> using namespace std; class Dice { public: long r[6]; Dice(){}; void roll(long a, long b, long c, long d) { swap(r[a], r[b]); swap(r[b], r[c]); swap(r[c], r[d]); } void spinW() { roll(0, 2, 5, 3); } void spinN() { roll(0, 1, 5, 4); } }; int main() { int a...
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18]]
1
482
#include <iostream> #include <map> #include <vector> using namespace std; class Dice { private: public: vector<int> d; void spin(string s) { if (s == "S") { swap(d[0], d[4]); swap(d[4], d[1]); swap(d[4], d[5]); } if (s == "E") { swap(d[0], d[3]); swap(d[2], d[3]); sw...
#include <iostream> #include <map> #include <vector> using namespace std; class Dice { private: public: vector<int> d; void spin(string s) { if (s == "S") { swap(d[0], d[4]); swap(d[4], d[1]); swap(d[4], d[5]); } if (s == "E") { swap(d[0], d[3]); swap(d[2], d[3]); sw...
[["+", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111]]
1
546
#include <iostream> #include <string> #include <vector> using namespace std; vector<int> x[100]; int n, t; bool same(vector<int> a, vector<int> b) { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { for (int k = 0; k < 4; k++) { for (int l = 0; l < 4; l++) { string s; f...
#include <iostream> #include <string> #include <vector> using namespace std; vector<int> x[100]; int n, t; bool same(vector<int> a, vector<int> b) { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { for (int k = 0; k < 4; k++) { for (int l = 0; l < 4; l++) { string s; f...
[["-", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111]]
1
558
#include <iostream> const int N = 7; const int DICE_COUNT = 100; const int ROTATION_MAX = 4; const int ROTATION_KIND = 3; const int ROTATION_PATTERN_COUNT = ROTATION_MAX * ROTATION_MAX * ROTATION_MAX; const int ROTATION_X = 0; const int ROTATION_Y = 1; const int ROTATION_Z = 2; const int ROTATION_MAP[3][N] = { ...
#include <iostream> const int N = 7; const int DICE_COUNT = 100; const int ROTATION_MAX = 4; const int ROTATION_KIND = 3; const int ROTATION_PATTERN_COUNT = ROTATION_MAX * ROTATION_MAX * ROTATION_MAX; const int ROTATION_X = 0; const int ROTATION_Y = 1; const int ROTATION_Z = 2; const int ROTATION_MAP[3][N] = { ...
[["+", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111]]
1
724
/*#include <iostream> using namespace std; class Dice{ public: int num[6],t;//t=top void North(){ /* dice.num[0] = ??? dice.num[1] = ??? dice.num[2] = ??? dice.num[3] = ??? dice.num[4] = ??? d...
/*#include <iostream> using namespace std; class Dice{ public: int num[6],t;//t=top void North(){ /* dice.num[0] = ??? dice.num[1] = ??? dice.num[2] = ??? dice.num[3] = ??? dice.num[4] = ??? d...
[["-", 0, 7, 8, 9, 0, 57, 64, 1, 0, 35]]
1
480
#include <iostream> #include <string> using namespace std; class Dice { public: int num[6], t; // t=top void North() { /* dice.num[0] = ??? dice.num[1] = ??? dice.num[2] = ??? dice.num[3] = ??? dice.num[4] = ??? dice.num[5] = ???*/ t = num[0]; num[0] = num[1]; //??????1?????¨??...
#include <iostream> using namespace std; class Dice { public: int num[6], t; // t=top void North() { /* dice.num[0] = ??? dice.num[1] = ??? dice.num[2] = ??? dice.num[3] = ??? dice.num[4] = ??? dice.num[5] = ???*/ t = num[0]; num[0] = num[1]; //??????1?????¨??? num[1] = num[...
[["-", 36, 36, 36, 36, 0, 30, 0, 135, 0, 138], ["-", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["-", 0, 7, 8, 9, 0, 57, 64, 1, 0, 35]]
1
671
#include <cstdio> #include <iostream> using namespace std; class Dice { public: int face[6]; Dice() {} Dice(int face1, int face2, int face3, int face4, int face5, int face6) { face[0] = face1; face[1] = face2; face[2] = face3; face[3] = face4; face[4] = face5; face[5] = face6; } vo...
#include <cstdio> #include <iostream> using namespace std; class Dice { public: int face[6]; Dice() {} Dice(int face1, int face2, int face3, int face4, int face5, int face6) { face[0] = face1; face[1] = face2; face[2] = face3; face[3] = face4; face[4] = face5; face[5] = face6; } vo...
[["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]]
1
548
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner scanner = new Scanner(System.in); double num = scanner.nextInt(); double x = num * num * num; System.out.println("x"); } }
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner scanner = new Scanner(System.in); int num = scanner.nextInt(); int x = num * num * num; System.out.println(x); } }
[["-", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 62]]
3
63
import java.io.*; public class Main { public static void main(String[] args) throws java.lang.Exception { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); String x = input.readLine(); int output = Integer.parseInt(x); output = output ^ 3; System.out.println(output); ...
import java.io.*; public class Main { public static void main(String[] args) throws java.lang.Exception { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); String x = input.readLine(); int output = Integer.parseInt(x); output = output * output * output; System.out.prin...
[["-", 8, 196, 0, 1, 0, 11, 12, 16, 17, 140], ["-", 8, 196, 0, 1, 0, 11, 12, 16, 12, 499], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 196, 0, 1, 0, 11, 12, 16, 12, 22]]
3
79
import java.io.*; public class Main { public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); try { String line = reader.readLine(); int n = Integer.parseInt(line); System.out.println(n ^ 3); } catch (IOException e) ...
import java.io.*; public class Main { public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); try { String line = reader.readLine(); int n = Integer.parseInt(line); System.out.println(n * n * n); } catch (IOException...
[["-", 0, 1, 0, 492, 3, 4, 0, 16, 17, 140], ["-", 0, 1, 0, 492, 3, 4, 0, 16, 12, 499], ["+", 0, 492, 3, 4, 0, 16, 31, 16, 17, 48], ["+", 0, 492, 3, 4, 0, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 48], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 12, 22]]
3
88