uuid stringlengths 36 36 | repo_name stringlengths 5 133 | relative_path stringlengths 3 3.76k | content stringlengths 282 4.03M | category stringclasses 6
values | algo_rel_score float32 0.9 1 | quality_score float32 3 8.13 | source_meta dict |
|---|---|---|---|---|---|---|---|
770177e6-f94b-49cc-8f96-be88acc14db4 | kwoncycle/poro-baek | 1000/1882/solve.c++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pii pair<ll,ll>
#define pll pair<ll,ll>
#define X first
#define Y second
#define CNT_LOWER(v,n) (ll)(lower_bound((v).begin(),(v).end(),(n))-(v).begin())
#define CNT_UPPER(v,n) (ll)(upper_bound((v).begin(),(v).end(),(n))-(v).begin())
#define al... | ALGO | 0.999978 | 3.752323 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2025-01-30T14:41:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c36380552f5... |
cdb59c7d-2147-421e-8965-a8ee7e2a4f65 | Javirc99/University_Projects | C++_Concurrency/Ch1_MemoryModel/simple_example.cpp | #include <iostream>
#include <thread>
#include <mutex>
std::mutex mtx; // Define a mutex
// Function to increment a shared variable
void increment(int &counter, int n) {
// Get the ID of the current thread
std::thread::id threadId = std::this_thread::get_id();
for (int i = 0; i < n; i++) {
{
... | ALGO | 0.991999 | 6.433424 | {
"github_metadata": {
"branch": "main",
"commit_count": 83,
"repo_created_at": "2023-09-11T23:01:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4a2b6a57da4... |
07a82fd2-a524-4f91-ba1c-5c0fbfb552ec | RainerKuemmerle/g2o | g2o/core/linear_solver.h | // g2o - General Graph Optimization
// Copyright (C) 2011 <NAME>, <NAME>, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above... | ALGO | 0.904663 | 6.889173 | {
"github_metadata": {
"branch": "master",
"commit_count": 1617,
"repo_created_at": "2012-01-12T10:18:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3276,
"forks": 1126,
"issues": 0,
"pull_requests": 5
},
"file_meta": {
"content_id": "5... |
bc9e5a06-d1a5-4205-a013-64644b381127 | Alenz81/Poker-Analysis | CardHandScorer.cpp | //
// Created by super on 3/18/2023.
//
#include "CardHandScorer.h"
CardHandScorer::CardHandScorer() {}
void CardHandScorer::sort(CardHand& hand) {
while (!inOrder(hand)) {
for (int i = 0; i < hand.getSize() - 1; i++) {
CardPoker temp = hand.getCardAt(i);
if (temp.getRank() < hand... | ALGO | 0.991594 | 5.766871 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-09-26T22:12:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "75ca85a2faca... |
4d1ed6a5-a978-4a2a-94be-682925e8edff | alexeev509/CodeforsesCourse | z-функция/step4/J_good_decision_not_mine.cpp |
#include <iostream>
#include <string>
using namespace std;
int len, r, l, z[2000000], pos{1};
string s;
int main()
{
cin >> s;
len = s.length();
s.append(s);
for (int i = 1; i < len; ++i)
{
if (i < r)
z[i] = min(z[i - l], r - i);
while (i + z[i] < s.length() && s[z[i... | ALGO | 0.999863 | 3.452473 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2020-10-30T16:46:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d4ef5159f21... |
7f0913e5-acb6-4e6d-b090-5bcf64775df2 | Yashdew/DSA | 2021/July Challenge 2021 Division 1 (Unrated)/temp.cpp | #include <bits/stdc++.h>
using namespace std;
#define Loop(z,n) for(long long int i=z;i<n;i++)
long long int originalArray[10]={0};
long long int forwardgcd[10]={0};
long long int backwardgcd[10]={0};
void GcdCalculation(long long int forwardgcd[],long long int backwardgcd[],long long int originalArray[], long long i... | ALGO | 0.999981 | 3.643637 | {
"github_metadata": {
"branch": "main",
"commit_count": 125,
"repo_created_at": "2020-08-10T06:47:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "951bd89a3f... |
6f3aa808-22c4-4b06-a427-f64a370c8468 | Autoratch/Thailand-Olympiad-in-Informatics | toi05_lkd.cpp | #include <bits/stdc++.h>
using namespace std;
#define MOD 1e9 + 7
#define endl '\n'
vector<int> ans;
bool ok;
int st = 1;
void solve(string s)
{
ans.resize(0);
for(int i = 0;i < 8;i++)
{
char t[2];
t[0] = s[i*2]; t[1] = s[i*2+1];
if(st==1)
{
if(t[0]=='0'){ st = ... | ALGO | 0.999951 | 3.988976 | {
"github_metadata": {
"branch": "master",
"commit_count": 164,
"repo_created_at": "2018-03-04T08:45:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 20,
"forks": 7,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "e005ce0... |
931a9dda-1c33-4664-90a6-de039e65a466 | saikiranboga/Coding | DEC13/CHODE.cpp | #include <stdio.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <stdlib.h>
using namespace std;
typedef struct Node{
int chr;
int freq;
}Node;
int compare(const void *a, const void *b){
int diff = (*(Node*)(a)).freq - (*(Node*)(b)).freq;
if(diff == 0)
return (*(Node*)(a)).chr - (*(... | ALGO | 0.999942 | 3.495028 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2014-11-13T19:17:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1fc0d8f881... |
a0a9dd1f-cb00-4f5d-b3b9-19d936b56f34 | What8888/FlightPlanner | bstset.h | #ifndef BSTSET_INCLUDED
#define BSTSET_INCLUDED
#include <iostream>
#include "fm.h"
template <typename T>
class BSTSet
{
private:
struct Node {
T value;
Node* left;
Node* right;
Node(const T& value) : value(value), left(nullptr), right(nullptr) {}
};
Node* root;
void clear(Node* node) {
if (!node)... | ALGO | 0.997952 | 4.362476 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2025-04-11T21:26:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e60db30274... |
5ed9bb33-e338-4922-bf76-3553f9d12f04 | surjendu104/Leetcode-Solutions | 1423. Maximum Points You Can Obtain from Cards/ans.cpp | /*Runtime: 119 ms, faster than 17.57% of C++ online submissions for Maximum Points You Can Obtain from Cards.
Memory Usage: 42.4 MB, less than 80.56% of C++ online submissions for Maximum Points You Can Obtain from Cards.*/
#include<bits/stdc++.h>
using namespace std;
class Solution {
public:
int maxScore(vector<... | ALGO | 0.999922 | 5.787879 | {
"github_metadata": {
"branch": "main",
"commit_count": 1112,
"repo_created_at": "2022-04-22T04:15:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "901c87983... |
42937860-7abf-4453-bb24-58abbbb5e54f | chr1sc2y/LeetCode_Archiver | LeetCode/cpp/1073.cpp | class Solution {
public:
vector<int> addNegabinary(vector<int> &arr1, vector<int> &arr2) {
int m = arr1.size() - 1, n = arr2.size() - 1;
if (m < n)
return addNegabinary(arr2, arr1);
int temp = 0, res = 0;
while (m >= 0) {
temp = arr1[m] + res;
if (... | ALGO | 0.999992 | 5.324087 | {
"github_metadata": {
"branch": "master",
"commit_count": 114,
"repo_created_at": "2019-01-17T05:27:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 207,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "dc6dca... |
e85ae858-65f4-4b21-b128-280b3c51c453 | jasperdoan/leet-code | 934. Shortest Bridge.cpp | class Solution {
public:
int shortestBridge(vector<vector<int>>& grid) {
int n = grid.size();
queue<pair<int, int>> q;
bool found = false;
int step = 0;
// Find the first island
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
i... | ALGO | 0.999978 | 5.507599 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2023-01-12T04:06:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "606befe69... |
6208c1ec-ec97-4adf-9f37-47fd114d3810 | ishandutta2007/codeforces-h | heltion/normal/1481/E.cpp | #include<bits/stdc++.h>
using namespace std;
constexpr int maxn = 500000 + 1;
int a[maxn], bit[maxn], dp[maxn];
vector<int> p[maxn];
int get(int u){
int m = 0;
for(; u; u -= u & -u) m = max(m, bit[u]);
return m;
}
void modify(int u, int m){
for(; u < maxn; u += u & -u) bit[u] = max(bit[u], m);
}
int main(){
i... | ALGO | 0.999653 | 3.725028 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T02:01:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5df7ff42b309... |
50b34a85-622c-4cf2-a99c-c2143045633c | naringcode/algorithm-training | BaekjoonOnlineJudge/2738.cpp | #include <bits/stdc++.h>
using namespace std;
int mat[104][104];
int n, m;
int temp;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cin >> n >> m;
for (int y = 0; y < n; y++)
{
for (int x = 0; x < m; x++)
{
cin >> mat[y][x... | ALGO | 0.999744 | 3.724029 | {
"github_metadata": {
"branch": "main",
"commit_count": 1082,
"repo_created_at": "2023-03-08T11:46:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "99341929b... |
cda716c3-40f2-4228-b008-27473bd2c7f8 | Prashanna-Raj-Pandit/CS-501-DSA-all-code | doublylinked_list.cpp | #include<iostream>
#include<stdlib.h>
using namespace std;
struct node
{
int data;
node*prev,*next;
};
class doubly_linked_list
{
private:
node*head,*tail;
public:
doubly_linked_list()
{
head=NULL;tail=NULL;
}
node* get_new_node(int x)
{
node* newnode=new node;
newnode->data... | ALGO | 0.998905 | 4.207981 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-12-15T00:10:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0b657dd6ac6c... |
7a37df87-ea15-4f35-8e48-c57901ea6cdf | trungams/http-server | src/http_message.h | // Defines objects that represents HTTP request and response
// and some utility functions to manipulate HTTP data
#ifndef HTTP_MESSAGE_H_
#define HTTP_MESSAGE_H_
#include <map>
#include <string>
#include <utility>
#include "uri.h"
namespace simple_http_server {
// HTTP methods defined in the following document:
/... | WEB | 0.94239 | 6.506709 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-08-20T05:46:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 134,
"forks": 31,
"issues": 3,
"pull_requests": 2
},
"file_meta": {
"content_id": "88a25ad... |
345c32b4-2515-4750-8ef0-158bb2b9c114 | pimukthee/competitive-prog | codeforces/742D.cpp | #include <iostream>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <utility>
#include <algorithm>
#define pb push_back
#define mp make_pair
#define sqr(x) x*x
#define LL long long
#define F first
#define S second
#define vi vector<int>
#define pi pair<int,int>
using namespace std;
vi g... | ALGO | 0.99999 | 3.653739 | {
"github_metadata": {
"branch": "master",
"commit_count": 55,
"repo_created_at": "2017-06-19T07:47:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dd3a3e28a... |
f2c16f5a-fcad-49e5-a4ff-a72ec7ae0cc3 | kgjun0314/Algorithms | acmicpc/14725.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <utility>
#include <tuple>
#include <queue>
#include <cstring>
#include <set>
#define endl "\n"
using namespace std;
int N, K;
set<string> s;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);... | ALGO | 0.999863 | 3.79608 | {
"github_metadata": {
"branch": "master",
"commit_count": 301,
"repo_created_at": "2022-04-30T05:23:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "04a3f18d... |
0f6f6730-36c2-44f9-aadc-59aaf17876c7 | glebmaslyak/Dualization | BitRuncM+.cpp | #include <iostream>
#include <fstream>
#include <ctime>
#include <vector>
using namespace std;
typedef unsigned int uint;
int col; //Число столбцов
int str; //Число строк
vector<int> k; //Мощности множеств P_i
vector<bool> chain; //True, если цепь. False, если антицепь.
int num_elem = 0;
int max_anti_chain = 0;
int ... | ALGO | 0.999886 | 3.434001 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-02-03T11:41:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "379737efdf... |
4befd980-7a2b-4be7-b171-67d2e177047b | CamelliaDPG/Camellia | src/Formulations/StokesVGPFormulation.cpp |
// StokesVGPFormulation.cpp
// Camellia
//
// Created by <NAME> on 10/29/14.
//
//
#include "StokesVGPFormulation.h"
#include "ConstantScalarFunction.h"
#include "Constraint.h"
#include "GMGSolver.h"
#include "HDF5Exporter.h"
#include "MeshFactory.h"
#include "PenaltyConstraints.h"
#include "PoissonFormulation.h"... | ALGO | 0.904612 | 3.840721 | {
"github_metadata": {
"branch": "master",
"commit_count": 4441,
"repo_created_at": "2012-04-24T18:09:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 15,
"forks": 9,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4ba878... |
5a4f1d31-ff66-4e0c-9873-c6d63b423495 | sumkincpp/qrepo | Programming/OlympProg/C++/UglyNumbers/ugly_numbers.cpp | #include <conio.h>
#include <stdio.h>
#include <math.h>
#include <iostream>
using namespace std;
#define prI(a) printf("[%d]", a);
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
/*
(int)pow иногда не срабатывает ??
floor (pow) ->
ceil (pow)
*/
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-... | ALGO | 0.999766 | 4.16569 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2015-03-15T08:48:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "131af2dc5f... |
87017cb5-9245-4d89-8f6c-8ed574ffaf11 | LexC/PuntoBancoGame | src/main.cpp | #include <iostream>
#include <random>
#include <chrono>
#include <string>
#include <vector>
#include <algorithm>
#include <cctype>
#include <limits>
#include <thread>
using namespace std;
constexpr int DECK_COUNT = 8; // Number of decks in the shoe
// -----| Functions for the Shoe |-----
// Function to generate... | TOOL | 0.905012 | 3.698277 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-09-20T20:54:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ab71c4572d42... |
c71a6b4f-9473-4093-a914-f4dbc587a488 | PrincetonUniversity/athena | src/eos/adiabatic_mhd.cpp | //========================================================================================
// Athena++ astrophysical MHD code
// Copyright(C) 2014 <NAME> <<EMAIL>> and other code contributors
// Licensed under the 3-clause BSD License, see LICENSE file for details
//=====================================================... | ALGO | 0.994466 | 3.970455 | {
"github_metadata": {
"branch": "main",
"commit_count": 5233,
"repo_created_at": "2014-05-02T16:11:56.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 270,
"forks": 152,
"issues": 24,
"pull_requests": 4
},
"file_meta": {
"content_id": "c8c8c... |
17586d0f-3982-4b21-bcd2-e95aac13fa01 | camil0palacios/Competitive-programming | solutions/uri/structures/1088 Burbujas y Baldes/solution.cpp | #include <bits/stdc++.h>
#define endl '\n'
#define ll long long
#define fori(i,a,b) for(int i = a; i < b; i++)
#define forr(i,a,b) for(int i = a; i >= b; i--)
#define fore(i,a,b) for(int i = a; i <= b; i++)
#define ft first
#define sd second
#define all(v) v.begin(), v.end()
#define sz(v) (int) v.size()
#define pb push... | ALGO | 0.999995 | 4.209924 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2018-10-30T16:26:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8fd486e3e... |
c95fa000-ef5e-482d-825d-d046757fec0b | keynekassapa13/lost-in-japan | main/a_cameras.cpp | #include <core/image.h>
#include <core/point.h>
#include <core/vector.h>
#include <core/scalar.h>
#include <core/julia.h>
#include <rt/ray.h>
#include <rt/cameras/perspective.h>
#include <rt/cameras/orthographic.h>
#include <iostream>
#include <rt/renderer.h>
using namespace rt;
float a2computeWeight(float fx, float ... | ALGO | 0.970286 | 6.002258 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-04-27T12:50:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "07b3f096c9... |
1f5a1b1d-e1b0-46f0-a363-4dee03f5de9c | wwangat/Bayes_Kinetic_Lumping | gibbs_process_v6.cpp | /*
name:gibbs_process_v5.cpp
revised on Feb23 2017
fast versionß
*/
//in this version, all the elements in the microstate TCM are used, and we don't care whether TCM is symmetrized or not.
int initialization(int *mapping, int sizeMicro, double **macrotCount, int **macronCount, int sizeMacro, double **data, int **find... | ALGO | 0.999853 | 3.880355 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2018-02-23T14:51:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0795137056... |
f54c1fd6-78dd-4711-9dbd-a5d49df0d20e | seasouth/projects-and-exercises | C++/exercises/balls-in-boxes-2.cpp | #include <string>
#include <vector>
#include <stack>
#include <list>
#include <algorithm>
#include <map>
#include <set>
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
class BallsInBoxes {
public:
map <string,int> balls;
vector <string> colors;
vector <int> nballs;
vecto... | ALGO | 0.999665 | 4.505373 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-07-31T19:02:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5367b18b7d... |
b27146e9-6f17-4895-9648-e7a045a8cfa7 | adham1919/git-zeft | ILLYA.cpp | #include <iostream>
using namespace std;
struct Robot
{
int64_t totScore;
int64_t choice;
};
struct Round{
int64_t robot1Score;
int64_t robot2Score;
int64_t robot1Choice;
int64_t robot2Choice;
int64_t roundNumber;
};
void playRound(Robot * a, Robot * b)
{
if((a->choice==1 && b->choice=... | ALGO | 0.999971 | 3.840265 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2020-11-26T11:20:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aee7209ee256... |
a5e19706-bbed-4613-b772-7089ddaca57e | ishika-srivastava/Cryptography | vignere_cipher.cpp | #include <string.h>
#include <iostream>
using namespace std;
string encryptVigenere(string &msg, string &key)
{
string cipher = "";
int keyIndex = 0;
for (size_t i = 0; i < msg.size(); ++i)
{
if (isalpha(msg[i]))
{
char base = isupper(msg[i]) ? 'A' : 'a';
int pV... | TOOL | 0.99726 | 4.708449 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2024-06-11T18:38:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a4e99bc0b115... |
1ec5437e-cc09-441c-987d-54ab8e940748 | abdelazizSalah/AlgorithmsAndProblemSolving | Graphs/GraphProblems/C.NumberOfIslands.cpp | #include <bits/stdc++.h>
using namespace std;
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define endl '\n'
// down, right, up, left
vector<int> dx = {1, 0, -1, 0};
vector<int> dy = {0, 1, 0, -1};
void dfs(const ... | ALGO | 0.999894 | 5.366254 | {
"github_metadata": {
"branch": "main",
"commit_count": 348,
"repo_created_at": "2022-08-24T09:57:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f94d59c764... |
d2f0218d-46b8-4b2c-8248-54cd0b7737d6 | liac1983/Prog | P05_ex4.cpp | #include <iostream>
using namespace std;
// Complex number
struct complex {
int real; // Real part
int img; // Imaginary part
};
// Print array of complex numbers
void print(const complex z[], int n) {
cout << "[ ";
for (int i = 0; i < n; i++) {
if (z[i].real == 0 && z[i].img == 0)
... | ALGO | 0.999412 | 5.418638 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-03-23T17:29:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "632836347c25... |
41d3ab93-2942-4d3d-82d2-3753122f39f6 | Guo-lab/LeetCode | 2023_With_Carl/dynamic-programming/72.编辑距离.cpp | /*
* @lc app=leetcode.cn id=72 lang=cpp
*
* [72] 编辑距离
*
* https://leetcode.cn/problems/edit-distance/description/
*
* algorithms
* Hard (62.78%)
* Likes: 2979
* Dislikes: 0
* Total Accepted: 369.3K
* Total Submissions: 588.2K
* Testcase Example: '"horse"\n"ros"'
*
* 给你两个单词 word1 和 word2, 请返回将 word... | ALGO | 0.999905 | 6.439874 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2023-01-23T14:03:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e22042e8d29... |
0a972fc7-0f0e-40f5-937e-6d73f6d68e7e | bbj14/atcoder | abc005/C/main.cpp | #pragma region Template // clang-format off
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define rep(i, m, n) for (int i = m; i < (int)(n); i++)
#define repe(i, m, n) for (int i = m; i <= (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define yesno {cout<<"Yes"<<en... | ALGO | 0.999981 | 4.856343 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2021-10-09T04:24:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "95e380e5a3e... |
ab763c36-25ae-4cec-bbc1-073c1809a70a | ssashish21/Data-Structure-Algorithms | level1/15.Generic Tree/17ceil_and_floor_in_generic_tree.cpp | #include "bits/stdc++.h"
using namespace std;
class TreeNode{
public:
int data;
vector<TreeNode*> children;
TreeNode(int data){
this->data = data;
}
~TreeNode(){
for(int i = 0 ; i < children.size() ; i++){
delete children[i];
}
}
};
TreeNode* construct... | ALGO | 0.99998 | 3.843503 | {
"github_metadata": {
"branch": "master",
"commit_count": 56,
"repo_created_at": "2020-06-22T05:36:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b30f19294... |
8136ced7-3b76-444f-a899-2fa3e0aaaaac | bisat19/Computer-Vision-101 | prak4_Abisatya_24060122120004.cpp | /*
Nama: <NAME>
NIM: 24060122120004
Tgl: 21 Mar 2024*/
#include <math.h>
//#include <windows.h>
#include <GL/glut.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
float angle=0.0, deltaAngle = 0.0, ratio;
float x=0.0f,y=1.75f,z=15.0f; // posisi awal kamera
float lx=0.0f,ly=0.0f,lz=-1.0f;
int deltaMove = 0,... | TOOL | 0.918886 | 4.036048 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2024-02-21T07:47:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6e1b16a631e... |
5a03bb12-11db-4a7a-9322-e87bb600e9ef | ajay/advent_of_code | src/2023/13/src/main.cpp | // adventofcode.com/2023/day/12
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <functional>
#include <iterator>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
// #include <fmt/core.h>
#include "lib/io.h"
#include "lib/parse.h"
#include "lib/run.h"
namespace {
class P... | ALGO | 0.99883 | 6.014707 | {
"github_metadata": {
"branch": "main",
"commit_count": 123,
"repo_created_at": "2021-12-01T05:52:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aea0232eca... |
0292bda7-6417-4150-9cf2-2774fc3ba417 | Adam-Diehl/Option-Pricing | Heston Options - Faster/HestonInnerLoop.h | //Declare function -- calculates a heston european option price
double HestonInnerLoop(double S, double K, double r, double T, double IV, int OptionType, double Kappa, double Theta, double Gamma, double Rho, int ChunkSize, int M);
double HestonInnerLoop(double S, double K, double r, double T, double IV, int OptionType... | ALGO | 0.999799 | 4.513632 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2017-06-08T04:07:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a5e24d55... |
5df7f0ce-31d5-4672-87e1-292f15bb0bd1 | rkaran04/Comptetive-Programming | Codeforces/Striver_CP_Sheet/Implementation & Constructive/486B_OR_Matrix.cpp | #include<bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
// input output
#ifndef ONLINE_JUDGE
freopen("input1.txt", "r", stdin);
freopen("output1.txt", "w", stdout);
#endif
// input output
// start code
int test;
// cin >> test;
test = 1;
for (int t = 0; t < test; t++) {
int m, n... | ALGO | 0.999858 | 3.905574 | {
"github_metadata": {
"branch": "main",
"commit_count": 92,
"repo_created_at": "2023-09-05T18:54:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e4978e6c76a... |
8bfd3605-fd72-4f0d-ada6-05c04538842e | surya3214/coding | SPOJ/MENU.cpp | // AC
#include <iostream>
#include <cstdio>
#define MAX_K 25
#define MAX_M 110
#define MAX_N 55
#define INF -1
using namespace std;
int n, k, m;
float dp[MAX_K][MAX_M];
struct {
int dish_id, times;
} last_cooked[MAX_K][MAX_M];
struct {
int cost, benefit;
} dishes[MAX_N];
void reset() {
for (int i = 0; i <= k; i++... | ALGO | 0.999959 | 3.632221 | {
"github_metadata": {
"branch": "master",
"commit_count": 86,
"repo_created_at": "2017-11-09T17:29:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d2faca2d0... |
5d93cd43-1cfa-4006-beca-d4f33114ff09 | belight2/BOJAlgorithm | 백준/Gold/1504. 특정한 최단 경로/특정한 최단 경로.cc | #include <bits/stdc++.h>
#define X first
#define Y second
#define pb push_back
#define ll long long
using namespace std;
using pi = pair<int,int>;
const char nl = '\n';
const int INF = 1e8+10;
int n, e, a, b, c;
int u, v;
vector<pi> adj[805];
int d[805][805];
void dijstra(int st, int d[]){
priority_queue<pi, vector<p... | ALGO | 0.999928 | 4.719194 | {
"github_metadata": {
"branch": "master",
"commit_count": 1026,
"repo_created_at": "2023-07-15T10:36:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4a390e4... |
103a0a22-94be-4edb-991e-35298adc7623 | alejandro-armenta/Unscented-Kalman-Filter | src/ukf.cpp | #include "ukf.h"
#include "Eigen/Dense"
using Eigen::MatrixXd;
using Eigen::VectorXd;
/*
Initialize everything to zero!
Check RMSE convergence!
CTRV Motion Model
RMSE error for each car!
X,
Y,
Vx,
Vy
*/
/**
* Initializes Unscented Kalman filter
*/
/*
It is missing operator asignment overload!
*/
UKF::UKF() ... | ALGO | 0.954218 | 4.944819 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-07-10T20:05:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ef0b2e4b506c... |
0efe0f16-be4a-4302-9da7-cee5d70e62b6 | redpony/cdec | mteval/ter.cc | #include "ter.h"
#include <cstdio>
#include <cassert>
#include <iostream>
#include <limits>
#include <sstream>
#ifndef HAVE_OLD_CPP
# include <unordered_map>
#else
# include <tr1/unordered_map>
namespace std { using std::tr1::unordered_map; }
#endif
#include <set>
#include <valarray>
#include <boost/functional/hash.hp... | ALGO | 0.978334 | 4.026027 | {
"github_metadata": {
"branch": "master",
"commit_count": 2289,
"repo_created_at": "2009-12-03T21:16:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 185,
"forks": 77,
"issues": 42,
"pull_requests": 8
},
"file_meta": {
"content_id": "b7c... |
abb1e9dc-321a-41ba-bc10-9df0353f2108 | wtangdev/acm | practice/dic/c.cpp | /*************************************************************************
> File Name: c.cpp
> Author: Anson
> Mail: <EMAIL>
> Created Time: Fri 12 May 2017 03:28:59 PM CST
************************************************************************/
#include <iostream>
#include <cstdio>
#include <cstring>
#include ... | ALGO | 0.999954 | 3.360762 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2017-07-25T10:55:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4327e3442... |
35efda40-505c-401b-8810-91b6286bcfeb | xipuhu/Graduation-Project | 3DMaze_test/MazePrim.cpp | #include"MazePrim.h"
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <iostream>
#pragma warning(disable : 4305)
#pragma warning(disable : 4244)
Maze_Prim::Maze_Prim() :nodeRow(0), mazeRow(0){
arr_nodeRow = NULL;
arr_mazeRow = NULL;
srand((int)time(0));
rand();
}
void Maze_Prim::initArray... | ALGO | 0.982105 | 3.217415 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2017-06-19T04:34:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4cba3df37... |
f766e8c5-08cd-4c14-9ad9-02d96de8f8d1 | saquibjawedbit/cp | B_Brightness_Begins.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD 1000000007
ll check(ll n) {
return n - (ll)floor(sqrt(n));
}
int main() {
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
ll tc =1;
cin >> tc;
for(ll t =1; t <= tc; t++) {
ll k; cin >> k;
ll left... | ALGO | 0.99996 | 4.172337 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2024-09-15T19:27:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9ca6f1e3a61... |
615c775a-8fc1-45c7-9a18-6d5484c6835e | MY-Chen2000/SJTU-CS138-Data-Structure | 数据结构作业3/源代码/517021910499_cmy_3/main.cpp | #include <iostream>
#include<stack>
#include<vector>
#include<time.h>
#include<windows.h>
#include<ctime>
#include "stack.h"
using namespace std;
int prorandom(int j)//产生从0到j-1的随机数
{
return rand()*j/(RAND_MAX+1);
}
void stltime()
{
stack<int,vector<int> >s1;
int i;
double Time=0;
doub... | ALGO | 0.951157 | 4.256593 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-09-11T07:49:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c8609ac258... |
71df82ac-c8a4-4076-aa62-f82af1334d30 | bu1th4nh/Online_Judge_Solutions | SPOJ/SPOJ_MAXARR1/MAXARR1.cpp | #include <iostream>
#include <fstream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;
//=====================================
//Macros
#define task "MAXARR1"
#define maxmn (int)(1e5+10)
#define FORi(x, y) for(int i=x; i<=y; ++i)
#def... | ALGO | 0.999921 | 4.072078 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2018-02-04T01:08:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "63e434588... |
8461f03b-b9da-4a8f-8390-aa7dd2c71431 | NatsukiYoshioka/3DParkourAction | GameFile/Collision.cpp | #include"common.h"
#include"DxLib.h"
#include"Collision.h"
//地面との当たり判定
bool JudgeHitGround(VECTOR &pos, int modelHandle, VECTOR linePos1, VECTOR linePos2)
{
MV1_COLL_RESULT_POLY hitPoly = MV1CollCheck_Line(modelHandle, frameIndex, linePos1, linePos2);
if (hitPoly.HitFlag)
{
pos.y += hitPoly.HitPosi... | ALGO | 0.965423 | 3.709895 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2023-11-17T01:21:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "da55ed6de51... |
94491bad-55d5-4a16-ae1e-df8917f11cf8 | samk002/SegmentTree | SegmentMin.cpp | #include<bits/stdc++.h>
using namespace std;
class segmentTree{
public:
int *initial;
int *tree;
int *lazy_tree;
segmentTree(int n){
initial = new int[n];
int a_size = 2*n- 1;
tree = new int[a_size];
lazy_tree = new int[a_size];
}
//build
void build(... | ALGO | 0.999997 | 4.96409 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-12-15T10:27:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9c60ba0a8e... |
6e103c27-2152-4138-89ee-a3b27ae509ca | Laetus/masterThesis | Global_Realtime.cpp | /*
* Global_Realtime.cpp
*
* Created on: Dec 16, 2015
* Author: laetus
*/
#include "Global_Realtime.hpp"
using namespace casadi;
int main(int argc, const char ** argv) {
std::cout << "Programm started" << std::endl;
std::string path = "data/tmp"; //Default
//Define settings for the global solution
o... | ALGO | 0.988718 | 4.246642 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-04-15T14:49:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 13,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae358004... |
34be859f-88b5-447b-9a77-933020f281ac | anshumanvarshney/CODE | Algorithm/Stringarray/rotationarray.cpp | /*
4)
Given an array you have to find the max sum of i*A[i] where i is the index
of the array obtained by rotating the element of the array one by one .
Your task is to complete the function max_sum which takes one argument
which is the array A [ ] and returns an integer value denoting the required max sum .
Exa... | ALGO | 0.999822 | 3.140622 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-02-05T10:45:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a375fa83f9... |
86f3ffa1-908f-4ed4-871f-97f675afce9a | yashmathur865/DSASolutions | Easy/Second Largest/second-largest.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function template for C++
class Solution{
public:
// Function returns the second
// largest elements
int print2largest(int arr[], int n) {
int sl = -1;
int l=0;
for(int i=1;i<n;i++){
if(arr[i]... | ALGO | 0.9999 | 5.549435 | {
"github_metadata": {
"branch": "main",
"commit_count": 447,
"repo_created_at": "2024-02-27T06:15:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2fcdc80144... |
50a3190f-d926-4b30-8e2b-2fd44b870c70 | alphaway/MyACM-Multi-University-Training | 2009/2009 Multi-University Training Contest 4 - Host by HDU/HDU2851/HDU2851/main.cpp | //
// main.cpp
// HDU2851
//
// Created by beMaster on 16/3/11.
// Copyright © 2016年 beMaster. All rights reserved.
//
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <queue>
using namespace std;
const int INF = 1<<30;
const int N = 2000 + 10;
struct Node{
int l,r,w;
}a... | ALGO | 0.999933 | 3.976423 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2016-03-06T08:09:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6b28b4521... |
fe08f94e-3892-4282-825e-9cd5815b596b | ajaysoni12/Love-Bubber-450-DSA-Sheet-Solutions | 5-LinkedList/149-getNthFromLast.cpp | #include <bits/stdc++.h>
using namespace std;
struct Node
{
int data;
struct Node *next;
Node(int x)
{
data = x;
next = NULL;
}
};
/* method 1 (using naive appraoch) */
int printNthFromLast(Node *head, int N)
{
int len = 0, i;
Node *temp = head;
// Count the number of ... | ALGO | 0.999992 | 4.850214 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2023-01-25T05:55:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ee6066100d2... |
5379a8d1-7bfb-4d25-aa04-168248d0bddf | Apress/beg-cplusplus17 | Beginning C++ 17 source code/Exercises/Chapter 18/Soln18_05/Soln18_05.cpp | // Exercise 18-5.
// Using callback functions to implement the so-called observer pattern,
// where a callback function is called whenever a certain event occurs (in this case: when a Box is delivered)
#include <iostream>
#include "DeliveryTruck.h"
void logDelivary(SharedBox box)
{
std::cout << "The box " << *box ... | ALGO | 0.955524 | 6.931382 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-03-09T12:23:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 118,
"forks": 66,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "fdfce703... |
1940e7d7-581f-447b-b239-349ab1524ecb | takefekat/Competitive-programming | AtCoder/dp/F/main.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
template <class T>
void chmax(T& a, T b) {
if (a < b) a = b;
}
int main() {
// 入力
string s, t;
cin >> s >> t;
ll S = s.size(), T = t.size();
// dp[i][j]:sのi文字目までと、tのj文字目までのLCS... | ALGO | 0.999997 | 4.885712 | {
"github_metadata": {
"branch": "master",
"commit_count": 69,
"repo_created_at": "2020-06-17T12:48:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "5555445c5... |
4362cae6-47f2-4f3b-aa2f-232530435285 | Jaygaur99/DS-Algo-Practice | Coding Minutes/Graph/1_Graph_Representation/2_adjency_list_with_Node.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
typedef vector<ll> vl;
typedef vector<vl> vvl;
#define rep(i, m, n) for(int i=m; i<n; i++)
class Node{
public:
string nam... | ALGO | 0.999782 | 4.699418 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-04-18T06:08:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2670f8ff921f... |
2bbd8001-053c-4f60-bab3-c34bf6d04e22 | Thales-OM/high-performance-computing | hw1/gemm_pugin_1.cpp | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <iostream>
#include <chrono>
#include <iomanip>
using namespace std;
// Simple sequential imlementation
void dgemm_sequential(int M, int N, int K, double *A, double *B, double *C) {
for (int i = 0; i < M; i++) {
for (int j = 0; j < N; j++) {
... | ALGO | 0.995163 | 5.110648 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-01-05T13:04:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fdc47d65143f... |
ba4496ae-6c56-4b09-bb03-70488878b8a0 | rikahoa/COMP3431-ass1 | src/ass1/src/ass1lib/astar.h | #ifndef _ASS1_ASTAR_H
#define _ASS1_ASTAR_H
#include <iostream>
#include <queue>
#include <vector>
#include <algorithm>
#include "maze.h"
#include "bot.h"
#define SAFE_PERCENT 60
using namespace std;
class State {
public:
State(int x, int y, double cost, double heuristic) :
State(x, y, cost, make_pair(... | ALGO | 0.9994 | 4.184391 | {
"github_metadata": {
"branch": "master",
"commit_count": 320,
"repo_created_at": "2017-04-29T13:53:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "10a87a12... |
1901cbdd-027f-4667-8090-7e7d4014aaf5 | jorgerodrigar/MARP | Problemas del juez automático/Ej50/PlantillaJuezCasosIlimitados.cpp | // <NAME>
// VJ24
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
using namespace std;
/*Demostración
Dadas la solución voraz y la solución óptima con las posiciones donde se deben poner los parches (p1, p2, ..., pi):
Si en la voraz hay una posición distinta a la óptima (pi != pj), sabemo... | ALGO | 0.99992 | 4.138285 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2018-09-27T13:34:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f87c7c99... |
e232e3f1-0136-45de-ac7d-f24d1ec10398 | Surajv311/myProgramming_Interview-Prep | Coding/PRACTICE-and-LEARNED/YOUTUBE_UNIVERSITY_XD/apna college/remove string duplicates - recursion.cpp | /*
///////////////////////////////////////////
remove duplicates from string using recursion
///////////////////////////////////////////
*/
#include <bits/stdc++.h>
#define int long long int
#define setbits(x) __builtin_popcount(x)
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define ct(x) cout<<x<<endl... | ALGO | 0.99996 | 4.404831 | {
"github_metadata": {
"branch": "master",
"commit_count": 958,
"repo_created_at": "2020-07-31T07:27:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f5ee6089... |
b38bb9b9-da2d-44c5-85a3-22c60561161c | xjsc01/csp | 202309/B.cpp | #include <bits/stdc++.h>
using namespace std;
int n, m;
typedef pair<double, double> PDD;
PDD a[200000];
int main()
{
a[0].first = 1;
cin >> n >> m;
for(int i = 1; i <= n; i++){
double x, y;
scanf("%lf%lf", &x, &y);
a[i] = a[i - 1];
if(x == 1){
a[i].first *= y;
... | ALGO | 0.999958 | 3.560675 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-04-01T09:11:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d4ea3d260ce... |
8fd5df64-572a-4be3-a12e-46df335ae5c1 | ajeshmonr7777/OpenCV_Projects | OpenCV/Tracking_Algorithms.cpp | #include <opencv2/opencv.hpp>
#include <opencv2/tracking.hpp>
#include <opencv2/core/ocl.hpp>
#include <fstream>
#include <sstream>
#include <iostream>
#include <string.h>
#include <opencv2/dnn.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/core.hpp>
#include <opencv2/core/cuda.h... | ALGO | 0.978968 | 5.336483 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2022-08-09T12:47:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ce1359cc7a... |
b3143104-b81b-4bf2-bdd2-85ad77a0f9d8 | getadeeb/YoungestCommonAncestor | YoungestCommonAncestor/main.cpp | //
// main.cpp
// YoungestCommonAncestor
//
// Created by <NAME> on 01/05/20.
// Copyright © 2020 <NAME>. All rights reserved.
// time complexity of the problem is o(d) space complexity is o(1)
#include <iostream>
#include <vector>
class AncestralTree {
public:
char name;
AncestralTree *ancestor;
Ancestral... | ALGO | 0.999533 | 3.885401 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-05-01T15:11:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac90661724... |
623ec12d-bca8-4e20-8a3c-bf31ccfb3a84 | GMAC-lib/gmac | tests/simple/gmac/cl/clThreadMonteCarloAsian.cpp | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include "gmac/cl.h"
#include "utils.h"
#include "clThreadMonteCarloAsianKernel.cl"
#define GROUP_SIZE 256
typedef struct _MonteCalroAttrib
{
cl_float strikePrice[4];
cl_float c1[4];
cl_float c2[4];
cl_float c3[4];
cl_float initPrice[4... | ALGO | 0.999668 | 5.381842 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2015-04-06T14:21:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c9c537aca1... |
3e8464d1-71fb-4ee0-a6c7-8b57c88d80e9 | harisai2005/DAALab | matrix.cpp | #include <iostream>
#include <limits.h>
#include <vector>
using namespace std;
void printOptimalParenthesis(vector<vector<int>>& s, int i, int j) {
if (i == j)
cout << "A" << i;
else {
cout << "(";
printOptimalParenthesis(s, i, s[i][j]);
printOptimalParenthesis(s, s[i][j] + 1, j... | ALGO | 0.999982 | 5.215284 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-04-02T08:08:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "29b9db1723da... |
81b02c0a-4aea-457f-bd45-ff22ebc48e6f | leo-ventura/computation-3 | Matrizes/matriz.cpp | #include <functional>
#include <vector>
using namespace std;
template<int L, int C>
class Matriz {
public:
vector<vector<double>> matrix;
Matriz() {
vector<vector<double>> m(L, vector<double>(C));
}
void insert(int i, int j, double v) {
matrix[i][j] = v;
... | ALGO | 0.999276 | 5.352655 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-09-23T22:29:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2a4170c2d3... |
7ff51bc3-d9ba-4b10-968a-f72a01934a48 | marcelkunze/rhonno | RhoNNO/TNNK.cxx | // TNNK
//
// Interface to <NAME>'s neural network kernel TNNKernel
// Part of the Neural Network Objects package (NNO)
//
// Author List:
// <NAME>, Bochum University
// M.Kunze, Bochum University, 1995
#include "TNNK.h"
#include "VNeuralNetPlotter.h"
#include <iostream>
using namespace std;
ClassImp(TNNK)
void TN... | ALGO | 0.972208 | 4.926826 | {
"github_metadata": {
"branch": "master",
"commit_count": 390,
"repo_created_at": "2015-03-30T16:00:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e40d21a1... |
82f8adb0-f2cb-4624-9a76-98bd03b88c4f | Dnursaurio/AED | Leque/Leque.cpp | #include <iostream>
using namespace std;
template<class O>
void print(O* arr, O tam)
{
for (O* i = arr + 0; i <= arr + tam - 1; i++)
{
cout << *i << " ";
}
cout << endl;
}
template <class T>
class Leque
{
public:
Leque(int tamano):tam(tamano)
{
mapa = new T* [tam];
mapeador = mapa + 0;
ptrarr = new T[t... | TOOL | 0.993771 | 4.044259 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2025-03-22T15:19:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "14f209d3c07... |
02e80618-8c39-476f-93d8-cde5ee284993 | ParitoshAnilNeelamChaurasia/sliding_window | 8-maximum-number-of-vowels-in-a-substring-of-given-length.cpp | // https://leetcode.com/problems/maximum-number-of-vowels-in-a-substring-of-given-length/description/
class Solution {
public:
bool is_vowel(char ch)
{
if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
{
return true ;
}
return false ;
}
int m... | ALGO | 0.999979 | 5.953547 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-09-18T09:08:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "569dfb54dc26... |
49d7fcb1-d09f-4ed7-9e77-c110d721d0df | followthwhiterabbit/cracking_the_coding_interview | CHAPTER_1_ARRAYS_AND_STRINGS/palindrome_permutation.cpp | /*
Given a string, write a function to check if it's a permutation of a palindrome. A palindrome
is a word or phrase that is the same forwards and backwards. A permutaion is a rearrangement of letters.
The palindrome does not need to be limited to just dictionary words. You can ignore casing and none-letter
characte... | ALGO | 0.999169 | 5.121689 | {
"github_metadata": {
"branch": "main",
"commit_count": 54,
"repo_created_at": "2023-01-28T08:35:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "88923df3037... |
58920e77-1c1f-4230-a459-d70cab27dde8 | Y0ungZ/algorithm-study | 윤호선/7주차/2015_수들의_합4.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;
int binary_search(vector<int>& v,int i) {
int s = 0, e = v.size() - 1;
int mid;
while (s <= e) {
mid = (s + e) / 2;
if (v[mid] < i)s = mid + 1;
else e = mid - 1;
}
return s;
}
int main() {
ios_base::sync_with_... | ALGO | 0.999971 | 4.275616 | {
"github_metadata": {
"branch": "main",
"commit_count": 330,
"repo_created_at": "2023-02-02T07:14:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f43b9777ae... |
e071c605-47a9-474e-9168-e268b7b02c57 | mainul3195/codes | Codeforces/round 954/D_Mathematical_Problem.cpp | #include <bits/stdc++.h>
using namespace std;
int calc(vector<int> &v)
{
int n = v.size();
int sum = 0;
for (int i = 0; i < n; i++)
if (v[i] != 1)
sum += v[i];
return max(1, sum);
}
void solve()
{
int mx = 0;
int n;
cin >> n;
string s;
cin >> s;
if (n <= 2)
... | ALGO | 0.999906 | 4.304439 | {
"github_metadata": {
"branch": "main",
"commit_count": 143,
"repo_created_at": "2024-04-07T19:43:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b0c04353e4... |
b0a94018-0f2f-4b6c-ae49-19041990657d | Musfiqshohan/Competitive-Programming | topics wise codes/data structure/Cellphone Typing.cpp | #include<bits/stdc++.h>
using namespace std;
char str[100009][90];
struct node
{
bool endmark;
int childs=0,serial;
node *next[26+1];
node()
{
endmark=false;
childs=0;
for(int i=0; i<26; i++)
next[i]=NULL;
}
}*root;
void insert(char *str, int len)
{
n... | ALGO | 0.998026 | 3.179857 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2018-01-04T10:50:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa2a278434... |
5638d0d2-69b2-487b-be6d-f541c5724cd2 | Ichurri/data-structures | lists/list (double-linked-list)/Node.h | #include <iostream>
template <class T>
class Node
{
private:
T data;
Node<T>* next;
Node<T>* previous;
public:
Node(T data, Node<T>* next, Node<T>* previous);
~Node();
T getData();
Node<T>* getNext();
Node<T>* getPrevious();
void createNext(T data);
void setData(T data);
vo... | TOOL | 0.929898 | 5.174078 | {
"github_metadata": {
"branch": "main",
"commit_count": 55,
"repo_created_at": "2024-08-05T02:56:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "03ef92e066a... |
78e26396-bb95-47f2-a1e9-e91db33002af | viniscoelho/spoj-br | DESCULPA.cpp | /*
Resolucao:
Aplicacao direta do algoritmo da mochila (knapsack)
Imprime o numero maximo de 'desculpa' que podem caber no texto
*/
#include <algorithm>
#include <iostream>
#define MAX 60
using namespace std;
int weight[MAX], value[MAX];
int fill_sack(int items, int maxWeight)
{
int dp[items + 1][maxWeight... | ALGO | 0.999637 | 4.026017 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2017-10-07T21:47:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d8cb9bcca3... |
8b8aee14-7f2e-40d8-83fa-4ab1c713cca2 | rudramahajan25/DSA | 151._Reverse_Words_in_a_String/151._Reverse_Words_in_a_String.cpp | /*
Given an input string s, reverse the order of the words.
A word is defined as a sequence of non-space characters. The words in s will be separated by at least one space.
Return a string of the words in reverse order concatenated by a single space.
Note that s may contain leading or trailing spaces or multiple spa... | ALGO | 0.999946 | 5.860161 | {
"github_metadata": {
"branch": "main",
"commit_count": 34,
"repo_created_at": "2024-12-29T09:20:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "66abbdaed95... |
36de0285-27a1-4af0-9076-ceb6d0a9566a | parasguglani1/competitive_coding | Codeforces/941 Div2/C_Everything_Nim.cpp | #include <bits/stdc++.h>
using namespace std;
using namespace chrono;
#define ff first
#define ss second
#define int long long
using ll = long long;
#define setbits(x) __builtin_popcountll(x)
#define zrobits(x) __builtin_ctzll(x)
#define mod 1000000007
#define inf 1e18
#define PI 3.1415926535897932384626
#define ps(x,... | ALGO | 0.99999 | 4.05316 | {
"github_metadata": {
"branch": "master",
"commit_count": 286,
"repo_created_at": "2021-12-15T15:58:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4747d57c... |
34567f61-3621-4205-8715-aa1a64fdf502 | Nilesh2000/ErrorFreeCodes | CodeForces/701B - Cells Not Under Attack.cpp | //Header Files
# include <iostream>
# include <algorithm>
# include <vector>
# include <numeric>
# include <cstring>
# include <set>
# include <cmath>
# define pb push_back
using namespace std;
int main(void) //Driver Function
{
long long n, m;
int x, y;
cin >> n >> m;
set <int> a, b;
while(m--)
{
... | ALGO | 0.999891 | 3.632095 | {
"github_metadata": {
"branch": "master",
"commit_count": 387,
"repo_created_at": "2019-02-12T16:28:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f775345d... |
add84dfa-251f-488e-a804-1053d7471ae9 | raincross7/code-similarity | codes/train_code/problem363/problem363_30.cpp | #define tst(a, b) for (int i = 1; i <= (b); i++) {cout << (a)[i] << " ";} cout << endl;
#define ll long long
#define lf long double
#define ch char
#define F(a) for (int i = 1; i <= (a); i++)
#define For(a, b) for (int (a) = 1; (a) <= (b); (a)++)
#define Rep(a, b, c) for (int (a) = (b); (a) <= (c); (a)++)
#define FD(a)... | ALGO | 0.999902 | 4.014285 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "11b217abcb16... |
34a4c03a-2a3f-408b-9140-8d5ee54c54b5 | Cube219/BOJ | 2000~3000/2201 - 이친수 찾기.cpp | #define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
using namespace std;
long long int k;
long long int d[200][2];
long long int p(int l, bool isParentOne)
{
if(l == 0) return 1;
if(d[l][isParentOne] != 0) return d[l][isParentOne];
if(l == 1) {
int r = 0;
if(isParentOne == true) r = 1;
else r = 2;
d[l][i... | ALGO | 0.999971 | 3.251334 | {
"github_metadata": {
"branch": "master",
"commit_count": 155,
"repo_created_at": "2019-07-31T04:37:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "23b30613... |
b9b497cf-c087-4234-94a4-9c9563851039 | TusPD1207/20210888PhamDinhTuTH2 | 20210888PhamDinhTuBai2TH2.cpp | /*
Bài tập 2.2. Viết hàm hoán vị vòng tròn 3 biến a, b, c.
Sau khi thực hiện hàm, các biến a, b, c tương ứng nhận các giá trị mới b, c, a.
*/
#include <stdio.h>
void rotate(int &x, int &y, int &z) {
/*****************
# YOUR CODE HERE - PHAM DINH TU 20210888 #
*****************/
int t = x; //gan bien ... | ALGO | 0.999972 | 4.738573 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-11-08T14:43:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6f1ea9d8c24f... |
966ccb86-606d-43f7-af0d-ee8ff2c672f3 | mindspore-ai/mindspore | mindspore/ccsrc/plugin/device/ascend/kernel/pyboost/customize/searchsorted.cc | /**
* Copyright 2024 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | ALGO | 0.999698 | 7.012952 | {
"github_metadata": {
"branch": "master",
"commit_count": 83896,
"repo_created_at": "2020-02-11T08:43:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4559,
"forks": 740,
"issues": 181,
"pull_requests": 20
},
"file_meta": {
"content_id": ... |
e9a0a18d-5cf4-4e03-b440-7d0de66bac66 | tomasz-kapela/prognisk | exercises/optymalizacja/zadanie3.cpp | // Kompilacja: g++ -std=c++11 -o main.o -c main.cpp
#include <iostream>
#include <vector>
using namespace std;
const int dim=256;
extern "C" void multiply(float A[dim][dim], float B[dim][dim], float C[dim][dim]);
int main(int argc, char **argv){
float A[dim][dim];
float B[dim][dim];
float C[dim][dim];
for... | ALGO | 0.998974 | 3.740417 | {
"github_metadata": {
"branch": "main",
"commit_count": 271,
"repo_created_at": "2021-10-28T08:01:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c7f3b7e744... |
3d34d794-5505-4d4a-b246-b6763ddac6db | rlglab/minizero | minizero/utils/utils.h | #pragma once
#include <algorithm>
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <cmath>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <string>
#include <vector>
namespace minizero::utils {
inline std::vec... | TOOL | 0.985391 | 7.086782 | {
"github_metadata": {
"branch": "main",
"commit_count": 446,
"repo_created_at": "2023-10-16T06:53:21.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 94,
"forks": 25,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "4e8028c60... |
454b74d1-a12c-4697-8219-9eff0bd8a177 | DavidCradock/DCP | ProjectFiles/StaticLibs/DavesCodeLib/Core/Utilities.cpp | #include "Utilities.h"
#include "Logging.h"
#include <algorithm>
#define NOMINMAX // Set this before including windows.h so that the min/max macros located in algorithm header take precedence
#define WIN32_LEAN_AND_MEAN // Exclude rarely used stuff from Windows headers
#include <Windows.h>
#include <psapi.h>
name... | TOOL | 0.938096 | 4.528687 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2024-08-28T15:32:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f850f26a0... |
ede73701-29cc-4d92-ae42-b6c9a2b7bdf3 | FLovascio/disc-tools | Surfaces/src/triangles.hpp | #pragma once
#include <cmath>
#include <string>
#include <sstream>
#include "linalg.hpp"
#include "utils.hpp"
template<typename T>
struct triangleVertices{
linalg3D::vector<T> A;
linalg3D::vector<T> B;
linalg3D::vector<T> C;
};
template<typename T>
struct triangleSides{
linalg3D::vector<T> a;
linalg3D::vec... | TOOL | 0.924799 | 6.380559 | {
"github_metadata": {
"branch": "main",
"commit_count": 63,
"repo_created_at": "2022-11-29T17:12:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3592302a709... |
2336dea7-29b8-4dba-abe9-1a1948a233c0 | rolfvdhulst/pcog | src/mwss/AugmentingSearch.cpp | //
// Created by rolf on 26-4-23.
//
#include "pcog/mwss/AugmentingSearch.hpp"
#include <stack>
#include <iostream>
#include <numeric>
namespace pcog{
AugmentingSearch::AugmentingSearch(const std::vector<SafeWeight> &greedyWeights, const DenseGraph &t_graph) :
... | ALGO | 0.999963 | 5.099451 | {
"github_metadata": {
"branch": "main",
"commit_count": 75,
"repo_created_at": "2022-11-18T11:24:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a42cb47351b... |
5a716cf9-2532-43dc-95c3-8facaba7c593 | oguzey/modern-cryptology | DifferentialCryptanalysisOfBlockCiphers/HeysCipher.cpp | #include <assert.h>
#include "HeysCipher.h"
#include "../CommonLib/logger.h"
#define SUB_BLOCKS 4
#define BITS_IN_SUB_BLOCK 4
#define AMOUNT_OF_ROUNDS 6
#define SWAP_BITS(x, i, j) \
({ \
unsigned int tmp##i##j = ((x >> i) ^ (x >> j)) & ((1U << 1) - 1); \
x ^ ((tmp##i##j << i) ... | ALGO | 0.999623 | 5.072706 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2015-10-11T09:23:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b1b1c89f... |
01d69049-31fb-412a-b6f9-a79be7581ead | muzahirhussain14/CrackingTheCodingInterview_Cpp | Linkedlist_LoopDetection.cpp | /*
Loop Detection: Given a circular linked list, implement an algorithm that returns the node at the
beginning of the loop.
DEFINITION
Circular linked list: A (corrupt) linked list in which a node's next pointer points to an earlier node, so
as to make a loop in the linked list.
EXAMPLE
Input: A -> B -> C - > D -> E... | ALGO | 0.999942 | 5.489069 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2021-10-09T19:13:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "704ac8743f6... |
d4eefc44-c0c3-403c-b1c9-4cd1d082be0e | ASSERT-KTH/Supersonic | predictions/submissions-aizu-cot-gpt35/Codenet/p01684/316569558/response_3.cpp | #include <iostream>
#include <cmath>
const double EPS = 1e-9;
double calc(double ra, double rb, double s) {
double lb = std::abs(ra - rb);
double ub = ra + rb;
int iterations = 40; // Reduce the number of iterations
while (iterations--) {
double d1 = lb + (ub - lb) / 3;
double d2 = ub - (ub - lb) / 3... | ALGO | 0.999902 | 4.275319 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-02-03T10:33:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "393d56895c17f... |
1d9fd81c-8442-4ca8-a16e-3d76bc2b5136 | soramimi/99 | cl/main.cpp |
// ref. http://the-united-front.blogspot.jp/search/label/OpenCL%E3%81%AB%E3%82%88%E3%82%8BGPGPU
#include <CL/cl.h>
#include <stdio.h>
#include <vector>
void GetPlatformIDs(std::vector<cl_platform_id> *out)
{
out->clear();
cl_int result;
cl_uint count;
result = clGetPlatformIDs(0, nullptr, &count);
if (result... | TOOL | 0.952677 | 4.140951 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2016-03-30T15:56:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc9fa9e0a9... |
bf9e03a7-9255-445f-a065-9b3d046c3bec | taufiqislam/algorithm-2 | algo2/kmp/kmp.cpp | #include<bits/stdc++.h>
#define ll long long
using namespace std;
class KMP
{
private:
string pattern;
vector<int> lps;
void buildLPS()
{
int len = 0;
lps[0] = 0;
int i = 1;
while (i < pattern.size())
{
if (pattern[i] == pattern[len])
{
... | ALGO | 0.999704 | 3.883826 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-05-15T05:28:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2892e8550539... |
a5e0cde9-ddcc-4922-bd4e-c2d2333e0ff4 | frogitcher/oop_misis_works_2022 | Kondratev_A_A/Rational/Tasks.cpp | #include "Tasks.h"
#include "Rational.h"
#include <iostream>
#include <vector>
void task1() {
Rational number1, number2;
std::cin >> number1 >> number2;
std::cout << number1 + number2 << std::endl;
std::cout << number1 - number2 << std::endl;
std::cout << number1 * number2 << std::endl;
std::co... | ALGO | 0.975337 | 4.224264 | {
"github_metadata": {
"branch": "main",
"commit_count": 184,
"repo_created_at": "2022-09-13T23:55:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 3,
"issues": 0,
"pull_requests": 5
},
"file_meta": {
"content_id": "5aefe3302e... |
baaa0933-7f27-4cb8-b047-583f5051bf1d | George-Creekbed/Code-quizzes | codility/permCheck/main.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int solution(vector<int> &A) {
if (A.size() == 1) {
if (A[0] == 1)
return 1;
else
return 0;
}
int N = A.size();
int max_el = *max_element( A.begin(), A.end() );
if (max_el != N)... | ALGO | 0.99971 | 4.47771 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2020-12-15T14:29:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "87723c862... |
b02e2fd1-cab5-4dec-9da9-9ac1afa4a0c1 | marcelra/plingtheory | NewtonSolver1D.cpp | #include "NewtonSolver1D.h"
#include <cmath>
namespace Math
{
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// constructor
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////... | ALGO | 0.999879 | 5.67896 | {
"github_metadata": {
"branch": "master",
"commit_count": 491,
"repo_created_at": "2014-01-20T21:38:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "280b16bd... |
f2edd5ee-101b-468e-bac4-daa0f2fe9a03 | gitanirban/CodePractice | Hrank_LeetCode/neetCode/roadmap/LinkList/Link_List.cpp | // 206. Reverse Linked List
#include<bits/stdc++.h>
using namespace std;
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), n... | ALGO | 0.999195 | 4.953844 | {
"github_metadata": {
"branch": "master",
"commit_count": 160,
"repo_created_at": "2021-02-19T10:06:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ee69c4b2... |
8bd53f6d-a996-4a85-b4ca-40e1d404d170 | dirkneuhaeuser/exercise-problems | network_flow/standard/kattis_piano.cpp | #include"bits/stdc++.h" // using "" instead of <>, so it will search locally for the precompiled version first
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<long, long> pll;
typedef pair<int, int> pii;
#define FOR(i, n) for(int i=0; i<n; i++)
#define FO... | ALGO | 0.999955 | 3.959026 | {
"github_metadata": {
"branch": "master",
"commit_count": 192,
"repo_created_at": "2021-08-16T21:41:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "af600d1... |
7374eb0d-c88c-45ef-bc38-bcee56249152 | NPTP/RaylTime | src/box_intersect_box.cpp | #include "box_intersect_box.h"
bool box_intersect_box(
const BoundingBox & A,
const BoundingBox & B)
{
double A_min_x = A.min_corner(0, 0);
double A_min_y = A.min_corner(0, 1);
double A_min_z = A.min_corner(0, 2);
double A_max_x = A.max_corner(0, 0);
double A_max_y = A.max_corner(0, 1);
double A_max_z =... | ALGO | 0.996834 | 5.59081 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2020-04-19T21:21:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b366763ee... |
4b760b65-3ba8-4945-a6da-b6a00e2010fd | sahajitaliyaa/Prodigy-infotech | SudokuSolver.cpp | #include <iostream>
#include <vector>
using namespace std;
const int SIZE = 9;
// Function to print the Sudoku grid
void printGrid(const vector<vector<int>>& grid) {
for (int row = 0; row < SIZE; ++row) {
for (int col = 0; col < SIZE; ++col) {
cout << grid[row][col] << " ";
}
... | ALGO | 0.999925 | 7.660987 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-24T05:40:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a28de02a7ace... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.