This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <map> | |
| #include <string> | |
| using namespace std; | |
| map<string,int> table; | |
| void print() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| #include <map> | |
| #include <iostream> | |
| #include <string> | |
| #include <fstream> | |
| #include <vector> | |
| #include <algorithm> | |
| #define MAX_LEN 128 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * Standard prelude: | |
| 0: LD 5,0(0) load maxaddress form dmem[0] | |
| 1: ST 0,0(0) clear dmem[0] | |
| * End of standard prelude | |
| * One instruction's place is reserved here | |
| 3: LDA 0,4(7) eax = return addr of main | |
| 4: LDC 2,1(2) pushl: push return addr of main | |
| 5: SUB 3,3,2 pushl | |
| 6: ST 0,0(3) pushl | |
| * One instruction's place is reserved here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * Standard prelude: | |
| 0: LD 5,0(0) load maxaddress form dmem[0] | |
| 1: ST 0,0(0) clear dmem[0] | |
| * End of standard prelude | |
| 2: LDA 3,0,5 reserved places for global variables | |
| 3: LDA 0,4(7) eax = return addr of main | |
| 4: LDC 2,1(2) pushl: push return addr of main | |
| 5: SUB 3,3,2 pushl | |
| 6: ST 0,0(3) pushl | |
| 7: LDA 7,143(7) jump to main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| statement: | |
| switch_stmt | case_label | compound_statement | |
| ; | |
| switch_stmt: | |
| SWITCH '(' expression ')' statement | |
| ; | |
| case_label: | |
| CASE NUM ':' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * Standard prelude: | |
| 0: LD 5,0(0) load maxaddress form dmem[0] | |
| 1: ST 0,0(0) clear dmem[0] | |
| * End of standard prelude | |
| 2: LDA 3,0,5 reserved places for global variables | |
| 3: LDA 0,4(7) eax = return addr of main | |
| 4: LDC 2,1(2) pushl: push return addr of main | |
| 5: SUB 3,3,2 pushl | |
| 6: ST 0,0(3) pushl | |
| 7: LDA 7,1(7) jump to main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1 | |
| 4 21 | |
| AA | |
| AB | |
| ACA | |
| ADB | |
| ADD | |
| BA | |
| BBB | |
| BBD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cmath> // sqrt | |
| #include <cassert> // assert | |
| #include <algorithm> // max, min | |
| using namespace std; | |
| const double eps = 1e-6; | |
| struct Cord{ | |
| double x, y; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <string> | |
| #include <fstream> | |
| #include <iostream> | |
| //#define DEBUG | |
| using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Slote Max Min Average | |
| 1 108 56 99 | |
| 2 110 98 104 | |
| 3 188 101 119 | |
| 4 199 89 157 | |
| 5 225 145 187 | |
| 6 221 104 191 | |
| 7 242 163 200 | |
| 8 242 164 208 | |
| 9 231 163 200 |