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> | |
| using namespace std; | |
| int matrix[199][199]; //maximo eh 200 | |
| int gr[199]; | |
| int x[199]; | |
| bool isBicolorable; | |
| void f(int n){ |
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<iostream> | |
| //Fácil - Let Me Count The Ways | |
| using namespace std; | |
| int main() { | |
| long ways[30001] = {0}; //se nao colocar double da valor negativo |
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 "tacalepau.h" | |
| #include<stdlib.h> | |
| TAC* makeBinOp(int type, TAC* code0, TAC* code1); | |
| TAC* makeIf(TAC* code0, TAC* code1); | |
| TAC* tacCreate(int type, HASH_NODE *res, HASH_NODE *op1, HASH_NODE *op2){ | |
| TAC* newtac = 0; | |
| newtac = (TAC*) calloc(1,sizeof(TAC)); |
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
| HASh_NODE *makeTemp(void) | |
| { | |
| static int nextTemp = 0; | |
| static char tempName[256]; | |
| sprintf(tempName,"myStrangeeTemp%d", nextTemp++); | |
| return hashInsert(HASH_VARIABLE, tempName); | |
| } | |
| HASh_NODE *makeLabel(void) |
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<stdlib.h> | |
| #include<iostream> | |
| #include<cmath> | |
| #include <iomanip> | |
| #define PI 3.14159265 | |
| 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
| #include <stdio.h> | |
| #include <algorithm> | |
| #include <stdlib.h> | |
| #include <iostream> | |
| #include <cstdlib> | |
| using namespace std; | |
| const int MAX = 120; | |
| struct position {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
| import java.util.Random; | |
| class MyMonitor { | |
| private int data = 0; | |
| private int turn = 1; | |
| public synchronized void update(int id) throws InterruptedException { | |
| while(turn != id) |
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 <algorithm> // std::sort | |
| #include <map> | |
| using namespace std; | |
| void printKMax(int arr[], int n, int k){ | |
| vector<pair<int,int> > d; | |
| for(int i=0; i<n;i++){ | |
| d.push_back(make_pair(arr[i],i)); | |
| } | |
| sort(d.rbegin(),d.rend()); |
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
| from django.conf import settings | |
| class OverrideSetting(object): | |
| """ | |
| Enable the temporary change of a setting. Useful for disabling settings when testing or creating fixtures on dev | |
| environment. | |
| CAUTION: Do not use it to change production settings. | |
| """ |
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
| #!/usr/bin/env python3 | |
| from abc import ABC, abstractmethod | |
| class AbstractFunction(ABC): | |
| @abstractmethod | |
| def install_function(self): | |
| pass |