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 <set> | |
| using namespace std; | |
| #define NUM_ELEM 6 | |
| #define NUM_CUTS 32 | |
| int elements[NUM_ELEM] = {1, 2, 3, 4, 5, 6}; | |
| int possible_cuts[NUM_CUTS][NUM_ELEM-1] = {0}; |
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
| [ | |
| { | |
| "status": 1, | |
| "src_port": { | |
| "status": 1, | |
| "mac": "fe:f3:ae:02:a2:ec", | |
| "sw_id": 22, | |
| "id": 38, | |
| "port_no": "2" | |
| }, |
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
| [ | |
| { | |
| "lc_id": 3, | |
| "ip": "", | |
| "gateway": false, | |
| "x": 10, | |
| "y": 20, | |
| "ports": [ | |
| { | |
| "status": 1, |
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
| while(scanf("%d", &len) != EOF){ | |
| } |
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
| while(cin >> len){ | |
| // finish your code 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
| #include <stdio.h> | |
| int board[8][8]; | |
| void print_board() { | |
| int r, c; | |
| for(r=0; r<8; r++) { | |
| for(c=0; c<8; c++) { |
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 <Servo.h> | |
| #include <math.h> | |
| int motor_pin[4] = { | |
| 3, 5, 6, 9}; | |
| Servo motor[4]; | |
| int throttle[4] = { | |
| 20, 20 ,20 ,20}; |
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 <dht.h> | |
| #include <string.h> | |
| // define sensor pin | |
| const int water_pin = A0; | |
| const int dht11_pin = 2; | |
| void setup() { | |
| //Initialize serial and wait for port to open: | |
| Serial.begin(9600); |
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 <stdio.h> | |
| #include <time.h> | |
| #include <stdlib.h> | |
| int main(int argc, const char *argv[]) | |
| { | |
| srand(time(NULL)); | |
| int c = 0, a = 0, b = 0; | |
| int num = rand()%5+6; |
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 <stdio.h> | |
| #include <time.h> | |
| #include <stdlib.h> | |
| int main(int argc, const char *argv[]) | |
| { | |
| srand(time(NULL)); | |
| int a = 0, b = 0, c = 0; | |
| int num = rand()%5+6; | |
| int* m[5] = {&a, &a, &b, &c, &c}; |