This file contains 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 <bits/stdc++.h> | |
using namespace std; | |
int n, k; | |
vector<int> v; | |
vector<vector<int>> boxes; | |
bool backtrack(int ik, int sum, int d_sum, int taken) { | |
if (ik == k && sum == 0) { |
This file contains 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 <bits/stdc++.h> | |
using namespace std; | |
const int N = 20; | |
int dp[1 << N]; | |
int sum[1 << N]; | |
int n, k, p[N], target; |
This file contains 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 <cmath> | |
int main(){ | |
double n; | |
int reais,centavos; | |
int x; | |
scanf("%lf",&n); | |
reais = trunc(n); | |
centavos = 100*(n - reais); | |
printf("NOTAS:\n"); |
This file contains 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> | |
int** aloca_matriz(int l,int c){ | |
int i; | |
int** matriz; | |
matriz = malloc(l*sizeof(int*)); | |
for(i=0;i<l;i++){ | |
matriz[i] = malloc(c*sizeof(int)); | |
} |
This file contains 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 os.path | |
import subprocess | |
import datetime | |
# Global definitions | |
d2_folder = "/home/danielsaad/d2-113/Diablo II" | |
backup_folder = "/home/danielsaad/Dropbox/d2bkp" | |
# Create the backup folder | |
print("Creating Backup folder") | |
os.makedirs(backup_folder, exist_ok=True) |
This file contains 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 main(void){ | |
char str[51]; | |
while(scanf("%50[^\n]%*c",str)!=EOF){ | |
printf("%s lido.\n",str); | |
} | |
return 0; | |
} |
This file contains 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
var express = require('express'); | |
var port = process.env.PORT || 8080; | |
var app = express(); | |
var mongoose = require('mongoose'); | |
var Livro = require('./app/models/livroModel'); | |
var bodyParser = require('body-parser'); | |
mongoose.connect('mongodb://127.0.0.1/Livros', function(err) { | |
if (err) throw err; | |
}); |
This file contains 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
var express = require('express'); | |
Livro = require('../models/livroModel'); | |
//Livro = mongoose.model('Livro'); | |
var router = express.Router(); | |
router.route('/') | |
.get(function (req,res){ | |
Livro.find({}, function(err,livro){ | |
if(err){ |
This file contains 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
int j; | |
void* aux,*tmp; | |
tmp = vet[i]; | |
for(j=i;j<tam-1;j++){ | |
aux = vet[j+1]; | |
vet[j+1] = tmp; | |
tmp = aux; | |
} |
This file contains 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 <vector> | |
#include <algorithm> | |
using namespace std; | |
class valorHora{ | |
public: | |
int valor; |
NewerOlder