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
e245673c-1302-4e0c-8466-e03026a32379
xuchenhan-tri/drake
multibody/fem/fem_solver.cc
#include "drake/multibody/fem/fem_solver.h" #include <algorithm> #include "drake/common/text_logging.h" namespace drake { namespace multibody { namespace fem { namespace internal { using contact_solvers::internal::Block3x3SparseSymmetricMatrix; using contact_solvers::internal::SchurComplement; using LinearSolver = ...
ALGO
0.99603
7.125189
{ "github_metadata": { "branch": "master", "commit_count": 31782, "repo_created_at": "2020-07-14T17:16:00.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "RobotLocomotion/drake", "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "co...
cffc1bcd-675f-494d-a63c-58d86d52679b
CodingAbhi/DataStructureAlgorithm_ProblemSolving_Solutions_CPP
Codeforces_Problems_DSA_CPPSolution/tvs1.cpp
#include <bits/stdc++.h> using namespace std; struct Result { int output1; int output2; }; Result profitDevelopment(int input1, int input2, int input3, int input4[]) { vector<int> a(input4, input4 + input1); Result res; int l = input1 / input2; vector<pair<int, int>> ans; vector<pair<...
ALGO
0.999958
3.949762
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2022-10-08T14:33: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": "61597ee86...
03ca4ef5-6cbd-4954-a30b-2c84c56bce9e
NYfLAmE/01-DateStructure
courses/Tree/CreateBinaryTree.cpp
// 7.25完尝试写一般树的代码失败,转战二叉树的构建代码,失败 // 写的什么勾八代码,这么low还写不对 #include<iostream> using namespace std; // 二叉树结点的属性集合 typedef struct BinaryTree{ int element; int size; BinaryTree* lchild; BinaryTree* rchild; }BT; // 初始化 void Init(BT* tree) { if (!tree) { cout << "未生成二叉树,正在生成一棵二叉树" << endl; ...
ALGO
0.999772
4.520359
{ "github_metadata": { "branch": "01DataStructure", "commit_count": 20, "repo_created_at": "2022-07-08T07:49: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": "...
722aa5ea-6f24-4e20-9eec-5ddbe3179181
niklas-uhl/graph-converter
lib/search.h
// // Created by <NAME> on 13.02.21. // #ifndef GRAPH_CONVERTER_SEARCH_H #define GRAPH_CONVERTER_SEARCH_H #include <vector> #include <queue> #include <stack> #include "types.h" #include "graph.h" template<class Graph> class BFS { public: BFS(const Graph& G): G(G), visited_(G.node_count()), queue_() { } ...
ALGO
0.997901
5.763752
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-01-23T16:35: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": "63e49a1ecc2...
402f5517-48b8-4f30-bb11-cc5f789bd621
LengyHELL/snooker_analysis
recognizer_cpp/src/headers/Section.hpp
#pragma once #include <opencv2/opencv.hpp> struct Section { float length; cv::Point start; cv::Point end; Section(): length(0), start(cv::Point()), end(cv::Point()) {} Section(const float& length, const cv::Point& start, const cv::Point& end): length(length), start(start), end(end) {} bool intersection(co...
ALGO
0.949096
4.194803
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2021-04-15T12:54: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": "05f68018...
b2c35181-1377-427c-98d2-7e1be48c5faf
Checking-pks/CodingTest
백준/Gold/32203. 연락/연락.cc
#include <iostream> #include <vector> #define m first #define w second #define ll long long using namespace std; vector<bool> genderList; ll couple = 0; class UnionFind { private: vector<ll> parent, size; vector<pair<ll, ll>> gender; public: UnionFind(ll n) { parent.resize(n + 1); gender.resize(n + 1); s...
ALGO
0.999991
3.835146
{ "github_metadata": { "branch": "main", "commit_count": 2221, "repo_created_at": "2021-12-27T07: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": "f816355d9...
73aaf293-048a-4060-9137-1206ae5ddfd8
Thanduriel/tensorCompress
src/core/truncation.hpp
#pragma once namespace truncation { struct AbstractTruncation { virtual ~AbstractTruncation() = default; virtual Eigen::Index operator() (const Eigen::VectorX<float>& _singularValues, int _k) const = 0; // virtual Eigen::Index operator() (const Eigen::VectorX<double>& _singularValues, int _k) const = 0; }; ...
TOOL
0.963471
6.881903
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2020-07-15T16:31:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a00c2dc57...
7244d272-ea96-4d56-bf21-eb2a48c620c8
dsc-sookmyung/2021-02-Algorithm-Study
06-이분탐색/강수아_rkdtndk99/A-18113.cpp
#include <iostream> #include <vector> using namespace std; vector<int> v; int main() { cin.tie(0); cout.tie(0); ios::sync_with_stdio(false); int n, k, m, gb; int l = 1, r = 1000000000, mid, count, p = -1; cin >> n >> k >> m; for (int i = 0; i < n; i++) { cin >> gb; if...
ALGO
0.999992
3.702459
{ "github_metadata": { "branch": "main", "commit_count": 192, "repo_created_at": "2021-09-11T09:08:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "02a83ca2deb...
9123ff0a-b4f4-4f15-93f7-972cf6c09467
nekkomoe/code
atcoder/abc129/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int mod = 1e9 + 7, N = 1e5 + 10; ll pw(ll a, ll b) { ll r = 1; for( ; b ; b >>= 1, a = a * a % mod) { if(b & 1) { r = r * a % mod; } } return r; } ll getinv(ll n) { return pw(n, mod - 2); } ...
ALGO
0.999996
3.814865
{ "github_metadata": { "branch": "master", "commit_count": 226, "repo_created_at": "2018-02-27T02:33:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ea212d...
99e10fe9-7194-4b5b-8d07-a97f97f6db5f
achintsetia/CodeChef
PPNUM.cpp
#include <iostream> #include <string.h> #include <math.h> #include <stdlib.h> #include <stdio.h> #include <vector> #include <algorithm> using namespace std; #define FASTIO 1 #if FASTIO ///////////////////// ////// INPUT //////// //////////////////// class INPUT { static const int BUFSIZE = 1<<16; static char buf...
ALGO
0.999828
4.553123
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2013-11-15T03:57: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": "9cc51d67d5...
72f2be08-d55b-4d96-afd0-a5a1c50086c5
flameshimmer/Leet2015_2
Leet2015_2/Leet2015_2/GasStation.cpp
#include "stdafx.h" //There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. // //You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i //to its next station(i + 1).You begin the journey with an empty tank at one of the gas stations. //...
ALGO
0.999959
5.391181
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2015-06-28T00:53: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": "7257c8ac8...
c0c1d349-fd69-4fe5-847a-631f516f2b18
ethz-asl/ethzasl_ptam
ptam/thirdparty/agast/include/agast/agast7_12s.h
// // agast7s - AGAST, an adaptive and generic corner detector based on the // accelerated segment test for a 12 pixel mask in square format // // Copyright (C) 2010 <NAME> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Publi...
ALGO
0.981016
5.236344
{ "github_metadata": { "branch": "master", "commit_count": 134, "repo_created_at": "2011-11-22T17:20:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 234, "forks": 183, "issues": 45, "pull_requests": 4 }, "file_meta": { "content_id": "59bc...
c43fd11d-4d04-4ee5-9e24-eb692adf5ac0
Themion/algorithm_practice
boj/13015.cpp
#include <cstdio> int main() { // N: 입력받을 수, space: x자에서 각 대각선 사이의 거리 int N, space; scanf("%d", &N); // 사용의 편의를 위해 N에 1을 빼준다 N -= 1; // space의 초기값을 설정해준다 space = 2 * N - 1; for (int i = 0; i < N; i++) { // x의 왼쪽 위 부분 // 왼쪽 선을 i칸 띄운 뒤 그리고, N - 1칸만큼 띄운 뒤 오른쪽 선을 그린다 ...
ALGO
0.999957
3.544494
{ "github_metadata": { "branch": "master", "commit_count": 155, "repo_created_at": "2021-03-20T13:36:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b878b3a0...
2a62b550-132e-40cf-8aa3-fc5784e761b3
rafshar95/Leetcode
787_cheapest_flights_within_k_stops.cc
class Solution { public: int findCheapestPrice(int n, vector<vector<int>>& flights, int src, int dst, int k) { std::vector<std::vector<int>> adj(n), weight(n), distance(k + 2, std::vector<int> (n, -1)); for(int i = 0; i < flights.size(); i++){ adj[flights[i][0]].push_back(flights[i][1]...
ALGO
0.999775
5.593896
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2022-10-18T17:45:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f86a532c0e...
52242749-1f55-498a-9010-33762e008fed
yash0530/Competitive-Programming
02 CONTESTS/Codeforces/ED94/E.cpp
#include <bits/stdc++.h> using namespace std; #define en "\n" #define INF (int) 9e18 #define HELL (int) (1e9 + 7) #define int long long #define double long double #define uint unsigned long long #define pii pair<int, int> #define pb push_back #define fs first #define sc second #define size(a) (int) a.size() #define de...
ALGO
0.999978
3.894885
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2019-12-15T06:50:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "998f8af7...
36a2472f-8455-4e49-bd75-a61d51cefc7a
kaldi-asr/kaldi
src/transform/regression-tree.h
// transform/regression-tree.h // Copyright 2009-2011 Saarland University // Author: <NAME> // See ../../COPYING for clarification regarding multiple authors // // 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 ...
DATA
0.941367
7.166562
{ "github_metadata": { "branch": "master", "commit_count": 9405, "repo_created_at": "2015-04-20T17:23:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14986, "forks": 5368, "issues": 189, "pull_requests": 63 }, "file_meta": { "content_id":...
177ac20c-36ef-466c-bcc0-196fa0778217
PetiteViking/OpenTensorVis
inviwo/opentensorvis/contourtree/src/processors/contourtreequeryprocessor.cpp
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2021 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that th...
ALGO
0.943133
4.473856
{ "github_metadata": { "branch": "main", "commit_count": 145, "repo_created_at": "2021-04-22T18:59: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": "539a9e78ee...
1e8ac218-f310-4763-85e1-d937fd5a4749
kshatriya-25/Mastering_Dynamic_Programming
DP/Minimizing_Coins.cpp
/* OM <NAME> :*/ #include <bits/stdc++.h> using namespace std; #define int long long int dp[1001001]; int n, x; int coins[1001001]; signed main() { ios ::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n >> x; for (int i = 0; i < n; i++) cin >> coins[i]; dp[x] = -1; //if given x is not reac...
ALGO
0.999885
3.99745
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-08-08T05:05: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": "7be6e49d57a...
9f79e446-51f0-426a-934e-e6d265ddfd3a
danielhO9/PS
BOJ/26001.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int cnt = 0; bool isSky(int w, ll h) { cout << "? " << w << ' ' << h << '\n'; cout.flush(); string s; cin >> s; ++cnt; return s == "sky"; } ll w, h; random_device rd; mt19937 g(rd()); int main() { ios::sync_with_stdio(0); ci...
ALGO
0.999982
3.098962
{ "github_metadata": { "branch": "main", "commit_count": 336, "repo_created_at": "2024-02-08T11:38:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ddd318195b...
0daace5e-2621-4d0c-a590-6480f4dbda9f
kunaln96/tic-tac-toe-kunal-
main.cpp
#include <cstdio> #include <cstdlib> #include <iostream> #include "board.h" using namespace std; int main(){ int counter = 0; //counter initiation for a tie int board_size; bool x_turn = true; cout << "2 PLAYER TIC-TAC-TOE" << endl; cout << "Enter a whole number for size of the board: "; cin >> board...
ALGO
0.956171
4.900157
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-02-24T06:31:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b52d49a03da1...
e5b93cba-147a-4182-afdc-4c3ba0fb272b
jonathantsang/CompetitiveProgramming
leetcode/contest/2018/may12/835.cc
class Solution { int verify(vector<vector<int>>& A, int xStart, int xEnd, int yStart, int yEnd, vector<vector<int>>& B, int xOffset, int yOffset){ int count = 0; for(int i = 0; i < A.size(); i++){ for(int j = 0; j < A[i].size(); j++){ if(i + yOffset > -1 && i + yOffset < ...
ALGO
0.999619
5.833973
{ "github_metadata": { "branch": "master", "commit_count": 125, "repo_created_at": "2018-02-13T15:43:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99f6ac59...
490913e6-d80c-4645-9c1f-ce2d01dbaf67
zachary-D/EE261-Lec03
PrintName.cpp
// ****************************************************** // PrintName program // This program prints a name in two different formats // ****************************************************** #include <iostream> // for cout and endl #include <string> // for data type string using namespace std; const string FIRST = "H...
TOOL
0.966304
4.328496
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-09-04T14:07:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59f83690ad...
bd13400f-69f1-48d7-8a31-2caf386bf673
phatcvo/adas
planning/frenet_planner/end_constraints_sampler.cpp
/////////////////////////////////////////////////////////////////​//////// /// @file end_constraints_sampler.cpp /// @brief /// @author /// @date Apr 18, 2018 /// @version 1.0.1 /////////////////////////////////////////////////////////////////​//////// #include "adas/planning/frenet_planner/end_constraints_sampler.h" ...
ALGO
0.946607
6.471785
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-06-01T15:08:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4bffb0bb79...
35ff8027-8a8b-4b72-a4b0-6acc016c6a11
Amarjeetkumar123/LeetCode_Gfg_DSA_Practice_2023
Easy/Maximum Weight Node/maximum-weight-node.cpp
//{ Driver Code Starts //Initial Template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution { public: int maxWeightCell(int N, vector<int> Edge) { vector<int>wt(N); for(int i=0;i<N;i++){ if(Edge[i] != -1) ...
ALGO
0.999847
5.290164
{ "github_metadata": { "branch": "main", "commit_count": 297, "repo_created_at": "2022-12-18T18:01:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "daeb5a266c...
99393a8e-bfe8-4ef8-81fb-e86980d2ff89
theayushkaul/Data-Structures-and-Algorithms
Dynamic Programming/2D DP/EditDistance.cpp
#include<bits/stdc++.h> using namespace std; class Solution { int solve(string word1, string word2, int i, int j) { // If we reach the end of word1, return the number of characters remaining in word2 if (i == word1.length()) { return word2.length() - j; } // If we reach ...
ALGO
0.999998
5.353918
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-08-08T17:09: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": "e693db42f2a9...
e389be6e-93a9-47c1-bdc7-bc9da3ec8ada
AustinJesse/MajorWorks
Ray Tracing Project (Bugs)/cpsc4366 03 jesse, a/Assignment 1&2/MatrixSource.cpp
#include "MatrixHeader.h" #include <iostream> matrix::matrix() { for (int i = 0; i < 16; i++) { data_[i] = 0; } } matrix::matrix(float const input[16]) { for (int i = 0; i < 16; i++) { data_[i] = input[i]; } } void matrix::printMatrix(matrix m) { cout << "|" << m.data_[0] << ", " << m.data_[1] << ", " << m....
ALGO
0.990374
3.426847
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-08-25T18:39: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": "710296f70837...
98b57ca6-8314-4b11-9629-1e7f309c4634
ajaysoni12/Love-Bubber-450-DSA-Sheet-Solutions
3-String/74-firstRepChar.cpp
#include <bits/stdc++.h> using namespace std; /* method 1 (using map or set) */ string firstRepChar(string s) { // store freq of char unordered_map<char, int> mp; // store result string result = ""; for (int i = 0; i < s.size(); i++) { // if char found means it is comes before ...
ALGO
0.999969
4.333977
{ "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": "e4489aab3e5...
0655bdb1-3ab5-4f85-a36e-57118c4a4d82
pb82/neve
http/path.cpp
#include "path.hpp" Fragment& Fragment::operator=(const Fragment& other) { this->isVariable = other.isVariable; this->value = other.value; return *this; } void Pattern::parseQuery(std::string &path, JSON::Object &params) { std::string key; stream.str(""); auto putarg = [&] { // If the...
WEB
0.91556
5.394744
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2018-05-23T19:59:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68a223001...
f0536396-3770-46fa-bafd-c3c1a8c8b70d
shehab0717/Competitive-programming
Uva 12626.cpp
#include<bits/stdc++.h> using namespace std; #define all(v) v.begin(),v.end() #define allr(v) v.rbegin(),v.rend() #define sz(v) (int) v.size() #define loop(i,from,to) for(int i=from;i<=to;i++) #define loopr(i,from,to) for(int i=from;i>=to;i--) typedef long long ll; typedef uns...
ALGO
0.999978
4.109796
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2018-04-06T21:37: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": "9ef381a80...
c69a3bba-a558-49b8-a256-aa28466e5d71
praktikum-tiunpad-2021/tugas-08a-Keen-taro
queue.hpp
/*NEED HELP WITH TEMPLATEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE*/ /*REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE*/ #pragma once namespace strukdat { namespace priority_queue { /** * @brief Implementasi struct untuk elemen, harus ada isi dan prioritas elemen. */ template <typename T> struct Element { int data; i...
ALGO
0.961532
5.190081
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-04-14T04:25:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d4331a529a24...
7d366473-8b04-4af7-864f-32c4230ee990
HTomJMW/DX9_Game
pick.cpp
#include "pick.h" Pick::Pick() { } Pick::~Pick() { } Ray Pick::CalcPickingRay(LPDIRECT3DDEVICE9 Device, int clickxPos, int clickyPos) { float px = 0.0f; float py = 0.0f; D3DVIEWPORT9 vp; Device->GetViewport(&vp); D3DXMATRIX proj; Device->GetTransform(D3DTS_PROJECTION, &proj); px = (((2.0f * clickxPos) / ...
ALGO
0.973509
3.90017
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2019-03-10T15:35: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": "a3a06ada1...
6309950e-c6fe-4a26-be1f-3f819ddb8356
PrernaSingh587/Leetcode-questions
34-find-first-and-last-position-of-element-in-sorted-array/34-find-first-and-last-position-of-element-in-sorted-array.cpp
class Solution { public: int bs(vector<int>& nums, int target,int x,int y,int k) { if(k==0) { int i=x,j=y; while(i<=j) { int m=(i+j)/2; if(nums[m]==target) { return m; } else if(nums[m]<target) { ...
ALGO
0.999959
5.962478
{ "github_metadata": { "branch": "main", "commit_count": 904, "repo_created_at": "2022-02-12T15:36:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c6f37d6165...
e1cdc5cb-8c0d-4094-97b7-6b3811a2cc1e
kimcodingvv/Problem-solving
BOJ/17825_주사위 윷놀이.cpp
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; int map[105], num[15], dice[5], ans; void mapping() { for (int i = 0; i < 20; i++) map[i] = i + 1; map[map[map[map[5] = 26] = 32] = 38] = 50; map[map[map[10] = 44] = 48] = 50; map[map[map[map[15] = 56] = 54] = 52] = 50; map[map[map[5...
ALGO
0.999491
3.680641
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2020-01-24T16: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": "39773099a...
734ff899-32a4-4fa1-8803-98ddfa0a1134
euidong/BOJ
23290/main.cpp
#include <cmath> #include <iostream> #include <vector> #include <queue> using namespace std; vector<vector<int>> directions_for_fish = { {0, -1}, {-1, -1}, {-1, 0}, {-1, 1}, {0, 1}, {1, 1}, {1, 0}, {1, -1} }; vector<vector<int>> directions_for_shark = {{-1, 0}, {0, -1}, {1, 0}, {0, 1}}; // 상좌하우 void move_fi...
ALGO
0.99995
5.250598
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2022-04-15T07:17:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe3de052e9f...
bdd7fddf-9505-419f-8a24-edbedbb94793
Abdullah-Uppal/data_structures_and_algorithms
Algorithms/SortingAlgos/mergesort.cpp
#include <iostream> void merge(int arr[], int start, int mid, int end); void mergesort(int arr[], int start, int end); int main() { const int SIZE = 10; int arr[SIZE] = {78, 45, 3, 42, 21, 34, 5, 66, 9, 10}; mergesort(arr, 0, SIZE-1); for (int i = 0; i<SIZE; ++i) { std::cout << arr[i] << " "; ...
ALGO
0.999941
5.55592
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2021-11-17T11:04:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2db3989dc16...
98707ee0-ef22-4378-9688-f151b7962fae
SafaruzzamanShovo/Problem-Solving---Competitive-Programming
CF-solved/1741C.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define fast ios_base::sync_with_stdio(false);cin.tie(NULL); #define fi(n) for(ll i=0; i<n; i++) #define fj(n) for(ll j=0; j<n; j++) #define rfi(n) for(ll i = n-1; i >=0; --i) #define fa(n) for(auto i:n) #define fa2(n) for(auto i:n) cout<<i<<' '; #defin...
ALGO
0.999958
3.390954
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-11-22T09:09: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": "bf9d9ef11f43...
f59bcb39-eb47-444a-a25a-5efe78bb6976
ssatwik975/leetcode-solutions
solutions/3501-delete-nodes-from-linked-list-present-in-array/solution.cpp
/** * 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), next(next) {} * }; */ /** * Definition for singly-linked list. * struc...
ALGO
0.999993
5.683894
{ "github_metadata": { "branch": "main", "commit_count": 1792, "repo_created_at": "2024-06-18T08:36:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c04f67a2...
85cef5ea-3a6e-4661-9474-b365d2e13449
Argent1024/BidirectionalWoS
src/ext/fcpw/include/fcpw/aggregates/sbvh.inl
namespace fcpw { template<size_t DIM, typename PrimitiveType> inline Sbvh<DIM, PrimitiveType>::Sbvh(const CostHeuristic& costHeuristic_, std::vector<PrimitiveType *>& primitives_, SortPositionsFunc<DIM, PrimitiveType> sortPositions_, bool printStats_, bool packLeaves_, int leafSize_, i...
ALGO
0.998682
6.155274
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2022-07-10T14:48:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c4f9aecf...
73e808a1-702e-4989-96a1-e17f75b2961c
rafaduran/rdc-blga
blga/carlosFitnessFunctions/PeriodicUnequal.cpp
// // C++ Implementation: PeriodicUnequal // // Description: // // // Author: rdc,,, <EMAIL>, (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "PeriodicUnequal.h" /* Constructor, solamente debe obtener el valor de la dimensión usada, que determinará la precisión usada p...
ALGO
0.998383
4.351986
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2015-08-05T17:14:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "52cf5cda6...
e29dd5cd-f5c0-41f9-8b2a-b5654ba4d254
dseco/acmudec
DanielOrtega/Semestre1-2017/Comentados/10226.cpp
#include <iostream> #include <cstdio> #include <map> using namespace std; /* El problema consiste en obtener el porcentaje de cada arbol con respecto al total del numero total de arboles el problema es resuelto con un map, ya que, se toma como identificador el nombre del arbol, y cada vez que este aparezca se au...
ALGO
0.997637
4.271574
{ "github_metadata": { "branch": "master", "commit_count": 264, "repo_created_at": "2014-08-08T21:33:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 12, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "8308a34...
9f7eaa39-5fb6-4778-89a4-353c5c07050e
mitlm/mitlm
src/estimate-ngram.cpp
//////////////////////////////////////////////////////////////////////////// // Copyright (c) 2008, Massachusetts Institute of Technology // // Copyright (c) 2010-2013, <NAME> <<EMAIL>> // // All rights reserved. // // ...
ALGO
0.99178
7.517893
{ "github_metadata": { "branch": "master", "commit_count": 110, "repo_created_at": "2016-03-28T15:22:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 117, "forks": 55, "issues": 23, "pull_requests": 2 }, "file_meta": { "content_id": "43504...
c4ae5810-0f61-41df-94d8-2f093dc4cb7e
Utkrisht2/Intresting-problems
problems+snippet/problem26.2.cpp
/*A particular month has 30 days, numbered from 1 to 30. Day 1 is a Monday, and the usual 7-day week is followed (so day 2 is Tuesday, day 3 is Wednesday, and so on). Every Saturday and Sunday is a holiday. There are N festival days, which are also holidays. Note that it is possible for a festival day to occur on a Sat...
ALGO
0.999761
4.205876
{ "github_metadata": { "branch": "main", "commit_count": 121, "repo_created_at": "2023-10-20T11:45:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "02b87e76eb...
ba3e180d-0438-4d1c-bd7f-1b5d705c7aad
Hamzawy63/Competitive-Programming
TOPICS/MST + DSU/p1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; #define EPS 0.0000000001 #define pb push_back #define space " " #define ar array #define pi pair<int,int> #define ff first #define ss second const int maxN = 102; vector<int> par(maxN); int find(int a) { if (par[a] ==...
ALGO
0.999993
4.004415
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-08-10T19:03:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b0e4dc6a...
38c4b4d2-034d-4a8b-b014-c190c1ea8b90
clarasdfgh/ALG
P2/DYV_Matriz/DYV_Matriz.cpp
/******************************************************************************* ALGORÍTMICA 19-20 -- PRÁCTICA 2: Divide y vencerás Ejercicio común: Traspuesta de una matriz Dada una matriz cuadrada de tamaño n = 2k , diseñar el algoritmo que devuelva la traspuesta de dicha matriz. Se debe tener en cuenta que ...
ALGO
0.999513
4.486597
{ "github_metadata": { "branch": "master", "commit_count": 155, "repo_created_at": "2020-03-11T10:19:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4046c37f...
ce783575-f134-44e4-9fe3-1de56c33a975
miyajiro/competitive_programming
atcoder/joi2015yo/f/f.cpp
#define TO_BE_SUBMITTED #include <bits/stdc++.h> // #include <atcoder/fenwicktree> #include <atcoder/segtree> // #include <atcoder/lazysegtree> // #include <atcoder/string> // #include <atcoder/math> // #include <atcoder/convolution> // #include <atcoder/modint> // #include <atcoder/dsu> // #include <atcoder/maxflow> /...
ALGO
0.999884
3.902996
{ "github_metadata": { "branch": "main", "commit_count": 499, "repo_created_at": "2020-06-20T09:19:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "96b3a6c40c...
852df3fa-f09b-47bb-852e-6f568fbe90c1
kostyl2220/CompilerTheory
ConsoleCompiler/ConsoleCompiler/parse.cpp
#include "pch.h" #include "parse.h" #include "Exceptions.h" #include "HelperFuncs.h" const int N = 100; int count_of_brackets = 0; bool error = false; vector<vector<char>> priors = { { '/', '*' }, { '+', '-' }, { '>', '<', '=', 'n' }, { '|', '&' } }; bool higherInPriority(char ch, char ch1) { size_t prior1 = 50...
ALGO
0.996977
3.81988
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-02-19T20:06: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": "21e6493210...
90a265a2-7de9-4b26-b9eb-4b710433efa2
ZHENZHI76/CPP_OJ_exercise
C++算法编程课C1/c++练习/OJ练习/4091_commentaire.cpp
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; // 将所有的橡皮擦转换为零散的块数 int total_blocks = a * 10 * 8 + b * 8 + c; // 计算可以打包成多少箱 int boxes = total_blocks / (24 * 10 * 8); // 计算剩下的块数 int remaining_blocks = total_blocks % (24 * 10 * 8); // 计算剩下的块数可...
ALGO
0.999657
3.584378
{ "github_metadata": { "branch": "master", "commit_count": 357, "repo_created_at": "2024-09-03T06:56:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3fd0b04...
d03be588-cddf-4d2c-af4f-84f86e85fe36
ShubhrajyotiPoddar/BinarySearch
paintersAlgo.cpp
#include <bits/stdc++.h> using namespace std; class test { private: int PaintingTimePerson(vector<int> arr, int mid){ int personsTaken=1, timeTaken=0; for(auto it: arr){ if(timeTaken+it<= mid) timeTaken+= it; else{ personsTaken++; timeTaken= i...
ALGO
0.999971
4.629498
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-09-28T11:56: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": "ec3766db8d45...
c0b327e1-8b63-40f3-b3d8-6cb8400e6443
thumlx12/leetcode
101-150/130. Surrounded Regions.cpp
// // Created by sensetime on 5/9/17. // #include <string> #include <iostream> #include <cstring> #include <vector> #include <climits> #include <math.h> #include <algorithm> #include <stack> #include <unordered_map> #include <stdlib.h> #include <time.h> #include <queue> #include <unordered_set> using namespace std; v...
ALGO
0.999847
5.410424
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2017-03-19T04:26:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f89d45f5...
59d75c64-9204-4ef2-af1b-6411df41d798
JaMo42/lst
source/natural_sort.cc
#include "natural_sort.hh" #include "args.hh" static def compare_non_digit (char a, char b) -> int { int c; if ((c = (a == '~') - (b == '~')) != 0) return c; if ((c = std::ispunct (a) - std::ispunct (b)) != 0) return c; if (Arguments::case_sensitive) return a - b; return std::tolower (a) - std::t...
ALGO
0.971057
6.848619
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2019-10-03T22:12:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ca7a1b9d13...
f4ebce11-b215-439d-ae49-369f272ae6eb
yujinn00/ConsoleAlgoEngine
AStar/ClickDemo/Algorithm/AStar.cpp
#include <iostream> #include "AStar.h" #include "Node.h" #include "Engine/Engine.h" #include "Math/Vector2.h" AStar::AStar() : startNode(nullptr), goalNode(nullptr) { } AStar::~AStar() { // 메모리 해제. for (Node* node : openList) { SafeDelete(node); } openList.clear(); for (Node* node : closedList) { SafeDe...
ALGO
0.999034
6.016677
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-02-24T01:28: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": "b3b4560e961...
f1304ba6-89f7-49ed-95d3-3dbfd1912c13
Abhishek-IEM/GFG-Solutions
Difficulty: Medium/Perfect Sum Problem/perfect-sum-problem.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int solve(vector<int>& arr, int target, int i, vector<vector<int>> &dp) { if(target == 0) return 1; if(i == arr.size()) return 0; if(dp[i][target] != -1) retu...
ALGO
0.999762
6.110279
{ "github_metadata": { "branch": "main", "commit_count": 847, "repo_created_at": "2024-09-19T15:15: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": "6dac47e5aa...
3e9cd915-ba98-4ff1-b808-0579ca7035cb
twolodzko/extraDistr
src/dirichlet-multinomial-distribution.cpp
#include <Rcpp.h> #include "shared.h" // [[Rcpp::interfaces(r, cpp)]] // [[Rcpp::plugins(cpp11)]] using std::pow; using std::sqrt; using std::abs; using std::exp; using std::log; using std::floor; using std::ceil; using Rcpp::NumericVector; using Rcpp::NumericMatrix; /* * Dirichlet-multinomial (multivariate Polya) ...
ALGO
0.998904
5.627804
{ "github_metadata": { "branch": "master", "commit_count": 420, "repo_created_at": "2016-04-03T19:51:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 53, "forks": 11, "issues": 7, "pull_requests": 1 }, "file_meta": { "content_id": "ccceb2...
bc8348d9-7522-4ffa-8de2-e8b6e1a40048
sane-aalam/LeetCode-100
C++/416-Partition-Equal-Subset-Sum.cpp
/* Variation of the 0-1 knapscak || TOP DOWN APRROACH A) create a matrix and installization of matrix B) if even 22 = 11 + 11 equal division possible otherwise no division possible C) if you have one part ( means you have one sum then simply findout the second sum ) if present then return true otherwise false;*/ ...
ALGO
0.999972
5.47806
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2023-01-28T16:25:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86ef3b2c6ef...
fb5c7bb5-6b8e-4365-b746-c5c84e485711
NAGAVENIGOWDA/My_Placement_prep_DSA
Striver's Sheet/stack-sum-of-minimum-ele-subarray.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int sumSubarrayMins(int N, vector<int> &arr) { stack<pair<int, int>> s1, s2; vector<int> left(N), right(N); // Calculate left count for (int i = 0...
ALGO
0.999968
6.198995
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2024-05-30T07:37: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": "6960559ba19...
f5784f9e-7033-408f-adcf-7edb1844c571
robert-ds/Cpp
Funciones/Ejercicio11.cpp
/* Ejercicio11: Escriba una funcion nombrada tiempo() que tenga un parametro en numero entero llamado totalseg y tres parametros de referencia enteros nombrados horas, min, seg. La funcion es convertir el numero de segundos transmitidos en un numero equivalente de horas, minutos y segundos */ #include <iostream> #incl...
ALGO
0.959825
3.900427
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2019-02-19T17:20: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": "2ff405240...
a2dce897-07f6-425e-82c5-c6d3ab7f7fc1
luyencode/cpp-solutions
solutions/GY03wMxp.cpp
/* Sưu tầm bởi @nguyenvanhieuvn Thực hành nhiều bài tập hơn tại https://luyencode.net/ */ #include<stdio.h> #include<conio.h> #include<math.h> #define MAX 100 void nhap (int a[], int &n) { do { printf("\nNhap so phan tu: "); scanf("%d", &n); if(n <= 0 || n > MAX) { ...
ALGO
0.999908
3.265506
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2021-04-10T08:00:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 96, "forks": 98, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "91e29d5c8c...
1e56524b-4888-4bb7-b48c-12fb39e2e3de
Sareeka61/Leetcode-Top-100-Liked-Solutions
linkedlist/21.mergeTwoSortedList.cpp
// You are given the heads of two sorted linked lists list1 and list2. // Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists. // Return the head of the merged linked list. // Example: Input: list1 = [1,2,4], list2 = [1,3,4] // Output: [1,1,2,3,4,4]...
ALGO
0.999956
6.155953
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2023-11-30T13:57:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb635f65fee...
a36daf1a-5cac-4acf-b2f5-a441cf6e6987
arafinmridul/cp_problems2
mx_subarr_sums.cpp
#include<bits/stdc++.h> using namespace std; #define int long long int #define nl '\n' //CF 1644C sub_array_sums void solve(){ int n,x; cin>>n>>x; int a[n]; for(int i=0; i<n; ++i){ cin >> a[i]; } //for max sum of each length vector<int> v(n+1,INT_MIN); v[0] = 0; for(int i=0; i<n; +...
ALGO
0.999518
4.836949
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-01-11T00:31:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fae513e675...
6c35fbe0-93ed-418e-bffe-041cdcb19592
Abhinav5050649/ProblemSolving
rc.cpp
#include "bits/stdc++.h" using namespace std; #include "bits/stdc++.h" using namespace std; typedef long long ll; #define pb push_back const ll mod = 1e9 + 7; typedef vector<ll> vll; typedef vector<int> vii; void swap(ll &a, ll &b) { a ^= b; b ^= a; a ^= b; } ll bin_exp(ll a, ll b) { a %= mod; ll res = ...
ALGO
0.999967
3.666391
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-11-08T08:55:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b4539530eac8...
a7d2efbb-6334-41d7-8eac-ce8560537557
AlbCM/Simple_Lists
include/ListaEnlazada.h
#ifndef LISTAENLAZADA_H #define LISTAENLAZADA_H #include <Nodo.h> #include <stdlib.h> #include <iostream> using namespace std; class ListaEnlazada { public: ListaEnlazada(); virtual ~ListaEnlazada(); Nodo* GetCabeza(){ return Cabeza;} void SetCabeza(Nodo* cab){ Cabeza = cab;} ...
TOOL
0.966126
4.47646
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-11-06T22:54: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": "a55d617cdf...
a3b07949-f02b-412f-8312-18f4f624423d
Nishit-Sharma/portfolio
src/app/static/C++ Labs/Coding Time at the Inventory/main.cpp
/** * Name: <NAME> * Program Name: (EC) Coding Time at the Inventory! * Date: 3/20 * Extra Thing: */ #include <cstdlib> #include <iomanip> #include <iostream> #include <limits> #include <stdlib.h> #include <vector> using namespace std; struct Item { int id = 0; string name = ""; string donor = ""; bool ...
TOOL
0.950661
5.37736
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2024-05-30T01:56: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": "ef0aefae4...
b59c5a09-1e6d-4721-9b3f-91476484a54e
3Strela/Competitive_Programing
Studies/NepsAcademy/AnyEx/LinhasCruzadas.cpp
#include <bits/stdc++.h> using namespace std; int inversoes(vector<int> &v) { int inv = 0; if (v.size() == 1) return 0; vector<int> u1, u2; for (int i = 0; i < v.size() / 2; i++) u1.push_back(v[i]); for (int i = v.size() / 2; i < v.size(); i++) u2.push_back(v[i]); i...
ALGO
0.999859
4.128138
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2020-06-05T22:45: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": "ebc364c2b...
fdd495ab-440f-4780-8b7b-b8fb257c1ae4
osushkov/phd_src
PhysicsLegoExperiment/src/Arm/ArmInverseKinematics.cpp
#include "ArmInverseKinematics.h" #include "ArmForwardKinematics.h" #include "ArmJointLimits.h" #include "Arm.h" #include "IKCommon.h" #include "../Util/Geometry.h" #include "../OptimiserClass/Optimiser.h" #include "../OptimiserClass/RRNelderMead.h" #include "../OptimiserClass/NelderMead.h" #include "../OptimiserClass...
ALGO
0.998957
5.076038
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-08-23T11:29: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": "3c7de98189...
0f940f12-083f-4876-8854-7224f2b2aa18
Altu-Bitu-8/Altu-Bitu-KimMinyong
03_정수론/필수/6588.cpp
#include <iostream> #include <vector> #include <cmath> #define MAX 1000000 using namespace std; vector<bool> isPrime() { vector<bool> is_prime(MAX + 1, true); is_prime[0] = is_prime[1] = false; for (int i = 2; i <= sqrt(MAX); i++) { if (is_prime[i]) { for (int j = i * i; j <= MAX; j += i) { is_prime[j] ...
ALGO
0.999735
3.83462
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2025-02-17T11:49:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15e2aadb6d6c...
b2722ede-eab3-4a7d-ae99-c26da64b27b5
itohdak/AtCoder
ABC/old/002/D.cpp
#include <bits/stdc++.h> #include "/home/itohdak/AtCoder/000/print.hpp" using namespace std; #define ll long long #define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--) #define rrep(i,n) RREP(i,n-1,0) #define REPL(i,m,n) for(ll i=(ll...
ALGO
0.999738
3.660842
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2018-05-20T09:26:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ffafe312...
a961137f-f92f-451d-8b72-aba6798eee92
skeid21/graph-traversal
src/a_star_solver.h
#pragma once #include <unordered_map> #include <queue> #include <vector> #include <forward_list> #include <unordered_set> #include <memory> #include <iostream> //Exploration of the A* search algorithm using std containers and templates template<typename NODE_TYPE, typename UNIT_TYPE> class AStarSolver { class Se...
ALGO
0.999669
6.180687
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-11-24T05:09: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": "473bce090d...
13a4d0b6-2f26-43af-9155-65aa95f9523d
Ethan-ZYF/CPTraining
train/Day023-0523-1600/最优贸易.cpp
#include <bits/stdc++.h> using namespace std; using i64 = long long; #ifdef LOCAL #include "algo/debug.h" #else #define debug(...) #endif //* given a directed graph, edges are unweighted //* each node has a value, you can perform one 'buy' operation and one 'sell' operation //* you want to maximize the profit, but yo...
ALGO
0.999971
4.390984
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2023-04-30T02:24:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eedaa4dfa65...
8f0b8ed2-1bdd-4834-8455-f89f224ed7de
Lronium/cpp_white_belt
BusStop/main.cpp
#include <iostream> #include <map> #include <string> #include <vector> using namespace std; int main() { int q; cin >> q; map<string, vector<string>> bus_stops; //маршрут->остановки map<string, vector<string>> stop_buses; //остановка->маршрут vector<string> buses; while(q > 0) { stri...
ALGO
0.985581
4.671917
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-08-05T01:28: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": "fcf63e6a21...
9b6622c1-1fc1-451b-aae2-785a7a72c368
Aashi19234/DSA-CPP
linkedlist.cpp
#include<iostream> using namespace std; class node{ public: int data; node*next;// pointer node ko point krra h toh node type ho gya and uska name next ho gya // constructor node(int data){ this->data=data; this->next=NULL; } // destructor ~node(){ int value=th...
ALGO
0.999745
4.870711
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-02-01T16:30: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": "7eee836a241...
d0d8f2f0-60da-4f15-9d0f-be20dbae07d8
MDNoorUddin/Uri-Onlinejudge-Solutions
1200.cpp
#include<bits/stdc++.h> using namespace std; int C; int x; class bst { struct tree { char data; struct tree *left; struct tree *right; }; tree *root; public: bst() { root=NULL; } bool f(char c) { tree * curr=root; while(curr) ...
ALGO
0.999604
3.52659
{ "github_metadata": { "branch": "master", "commit_count": 432, "repo_created_at": "2017-08-20T18:58:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04c6c9...
3994b14a-f588-4ae0-a71e-5bf093704cec
jk-jung/problem-solving
codeforces/Codeforces Round 57x/R575_div3_C.cpp
#include <cstring> #include <cstdio> #include <cmath> #include <cassert> #include <set> #include <map> #include <array> #include <stack> #include <queue> #include <vector> #include <numeric> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; typedef pair<int, int> pi; typedef vector<i...
ALGO
0.999886
3.64127
{ "github_metadata": { "branch": "main", "commit_count": 1582, "repo_created_at": "2021-06-24T13:40:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0ddbddd5...
16ebe35a-03c2-4f6f-b708-922e07e50a06
ReNginx/acm
HOJ/1349/b.cpp
#include <set> #include <cstring> #include <iostream> #include <algorithm> #define fi first #define se second using namespace std; typedef pair<int, int> pii; const int maxn = 1e5 + 10; int n, h, tot, ans; int f[maxn], t[maxn], d[maxn], sty[maxn], ans_t[maxn]; multiset<pii, greater<pii> > q; int main() { while (cin...
ALGO
0.999956
3.111629
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2017-04-24T14:09:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "feaeb5fd9...
0f9a6e83-7cf1-4300-9783-1b236b0dd90e
ubyhzargam/DSA_C_Cpp
circular_queue/main.cpp
#include <iostream> using namespace std; struct queue { int size; int f; int l; int *s; }; void enqueue(struct queue *q,int x) { if((q->l+1)%q->size==q->f) { cout<<"Queue is Full "<<endl; } else { q->l=(q->l+1)%q->size; q->s[q->l]=x; } } void dequeue(st...
ALGO
0.99854
3.555686
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2024-01-05T15:27: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": "6c51cef8d47...
087494d7-f860-421f-9fd3-bb152d42601e
davisking/dlib
tools/python/src/rectangles.cpp
// Copyright (C) 2015 <NAME> (<EMAIL>) // License: Boost Software License See LICENSE.txt for the full license. #include <dlib/python.h> #include <dlib/geometry.h> #include <pybind11/stl_bind.h> #include "indexing.h" #include "opaque_types.h" #include <dlib/filtering.h> using namespace dlib; using namespace std; n...
TOOL
0.959266
3.140101
{ "github_metadata": { "branch": "master", "commit_count": 8325, "repo_created_at": "2014-01-29T00:45:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14068, "forks": 3436, "issues": 41, "pull_requests": 5 }, "file_meta": { "content_id": ...
411375f4-e2c3-4514-b540-31809203b70b
erwincoumans/experiments
opencl/primitives/AdlPrimitives/Sort/RadixSortHost.inl
/* 2011 <NAME> */ template<> class RadixSort<TYPE_HOST> : public RadixSortBase { public: struct Data { HostBuffer<SortData>* m_workBuffer; }; enum { BITS_PER_PASS = 8, NUM_TABLES = (1<<BITS_PER_PASS), }; static Data* allocate(const Device* deviceData, int maxSize, Option option = SORT_...
ALGO
0.997798
5.016119
{ "github_metadata": { "branch": "master", "commit_count": 443, "repo_created_at": "2011-05-31T01:15:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 132, "forks": 26, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "9fae5...
ab99d085-74d8-4ba3-b842-4f7fd5876798
PatNichols/examples
smptr/petlib_tchol.hpp
namespace petlib { template <typename T> struct cholesky_decomposition {}; #ifndef _CHOL_HPP_ #define _CHOL_HPP_ using namespace std; template <typename T> inline void Chol_i_decomp(int nr, T *__restrict__ a, int lda) { T *p = a; const int str = lda + 1; for (register int i = 0; i < nr; p += str, i++) { ...
ALGO
0.999783
4.58709
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2020-02-04T22:45: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": "26424b04f...
d656ceb0-8e66-4b66-bfbf-74053c7e1477
ishandutta2007/codeforces-h
hibye1217/normal/1647/A.cpp
#include <bits/stdc++.h> #define endl '\n' #define PRECISION 0 using namespace std; using ll = long long; using ld = long double; #define fr first #define sc second using pi2 = pair<int, int>; using pl2 = pair<ll, ll>; #define all(v) v.begin(), v.end() #define unq(v) sort( all(v) ); v.erase( unique( all(v) ), v.end() )...
ALGO
0.999772
4.298039
{ "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": "a8802bf5242e...
dceaac91-87be-4400-9a94-767076533fd6
Asevenx174/CP-source-code-
02_OJ_solution/Cf contest/816 div2/c.cpp
#include<bits/stdc++.h> #define pf printf #define ff first #define ss second #define sef second.first #define ses second.second #define ms(a,b) memset(a, b, sizeof(a)) #define pii pair < long long , long long > ///%I64d %Lf /// ios::sync_with_stdio(0); cin.tie(0); /// ar.resize(n+10, vect...
ALGO
0.999977
3.582096
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-12T16:42:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1eb35743623...
144ee1ec-182b-48f2-a4a7-b0da230d99b1
pritamSarkar123/DS_ALGO_CPP
greedy/primsKruskals/prims.cpp
#include <iostream> #include "node.h" #include "graph.h" #include "heap.h" #include "disjointSet.h" #define VISITED 9999 #define HIPPED 999 using namespace std; int main(){ int noOfEdges=9; int noOfVertices=8; int totalCost=0; int startingVertex=1; int i=noOfVertices-1; Node *n=NULL; Graph g; Heap h(...
ALGO
0.999982
3.720994
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2020-08-25T13:35:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1d3e79c2...
e1b29461-1f56-40e2-8337-478812f5786a
soledadlinares/ORT-Algoritmos2
BACKTRACKING/caballoConPoda.cpp
#include <climits> #include <string> #include <iostream> #include <cassert> using namespace std; bool coordenadasValidas(int fila, int columna, int N){ return fila < N && columna < N && fila >= 0 && columna >= 0; } bool paseAntes(int fila, int columna, int ** tablero){ return tablero[fila][columna] != 0; } v...
ALGO
0.999818
4.764987
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2022-12-29T23:30:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d3cd55e0...
79b3f5e1-8268-4e8a-beef-aeb03bafd9a0
kahvia-d/Algorithm
Acwing/graduate/3/AcWing3302_SuffixExpression.cpp
// // Created by Kahiva on 2023/10/24. // /* * 后缀表达式:操作符在被操作数后面的表达式。 * 只需要将中缀表达式计算代码中,有关数字的地方改成,数字不再压入栈中,而是直接输出,计算函数直接输出操作符。 * 这样就完成了中缀表达式向后缀表达式的转换。 * Actually,中缀表达式的计算,就是将表达式转换成后缀表达式,边转换,边计算。 */ #include "iostream" #include "stack" #include "cstring" #include "unordered_map" using namespace std; stack<char> op...
ALGO
0.999823
4.352288
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-10-15T07:51: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": "07ae8316ec4...
9a4018db-e747-4a43-a5a5-1fc72d1d622b
lazy-chess-player/codeforce_round
div2/Round 956/C_Have_Your_Cake_and_Eat_It_Too.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include <iostream> #include <vector> #include <algorithm> #include <set> #include <unordered_map> #include <cstring> #include <cstdio> #include <string> #include <queue> #include <stack> #include <map> #include <list> #include <bitset> #include <cmath> #include <numeric> #define end...
ALGO
0.99965
3.44947
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2023-12-31T01:58: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": "98b5628cc2e...
64662b73-de35-4b2f-b704-a6f88ca3e887
RenanXM/Computer-Graphics
task6/malha/malha.cpp
#include "malha.h" #include <iostream> Malha::Malha() { } Malha::Malha(Intensidade Ke, Intensidade Kd, Intensidade Ka, double m) : Objeto(Ke, Kd, Ka, m) { } Malha::Malha(string path, Intensidade Kd, Intensidade Ke, Intensidade Ka, double m) : Objeto(Ke, Kd, Ka, m) { this->inicializar(path); } void Malha::inicializ...
ALGO
0.966142
3.752547
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-04-26T00:02: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": "0e3fb94177ea...
325cb9fe-2d32-44a2-8ee1-9a70019fab48
PerthCharles/Coding
leetcode/C&C++/easy/RomaintoInteger.cpp
/* * Roman to Integer * Given a roman numeral, convert it to an integer. * * Input is guaranteed to be within the range from 1 to 3999. */ // This is boring, by the way. class Solution { public: int map(char c) { switch(c) { case 'I': return 1; case 'V': return 5; ...
ALGO
0.999596
5.306628
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2014-06-28T14:17:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 54, "forks": 36, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "e9624d3...
b85f8bc4-9c5d-4f27-a0cf-bac175c7108d
IceIce1ce/Lab-Programming-Techniques-HCMUS
Singly Linked List/H04/Ex10/Ex10.cpp
#include"Ex10.h" Node* createNode(int x) { Node *p = new Node; if (p != NULL) { p->data = x; p->next = NULL; } return p; } void createList(LinkedList &lst) { lst.head = lst.tail = NULL; } bool read(Node *&p, const char *path) { int x; ifstream fin; fin.open(path); if (!fin.is_open()) return false; p = nu...
ALGO
0.998495
3.74203
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-04-17T13:41:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec01c51799...
4ac5f57c-d10c-4087-a199-e531df5e98c6
taicr/SOURCE-CODE
tai2.cpp
#include<bits/stdc++.h> using namespace std; #define run() ios_base :: sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define ll long long #define mod 1000000007 #define sotp cout << fixed << setprecision(2) #define pb push_back #define vi vector<int> #define pi pair<int, int> #define S second #define F first ...
ALGO
0.999977
4.150614
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-08-28T14:42: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": "852dd0871e5d...
3dbf4b44-601b-4720-9f17-f1b9677c2b9b
devJSY/PS
백준/Silver/10828. 스택/스택.cc
#include <stdio.h> #include <string.h> int stack[10001] = {}; int Index = 0; void push(int X) { stack[Index++] = X; } void pop() { --Index; if (Index < 0) { Index = 0; printf("%d\n", -1); } else { printf("%d\n", stack[Index]); stack[Index] = -1; } } void size() { int i = 0; while (1) { if (s...
ALGO
0.99808
3.726899
{ "github_metadata": { "branch": "main", "commit_count": 551, "repo_created_at": "2022-03-15T13:30: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": "29ec605f6c...
426bd097-9756-4916-acf3-5f80006bedf8
tobygz/confuse_msgpack
include/agpack/preprocessor/arithmetic/add.hpp
# /* Copyright (C) 2001 # * <NAME> # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by <NAME> (2002) */ # # /* See http://www.boost.org for most rec...
TOOL
0.988167
6.308049
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-05-11T14:31:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f26aca59b5...
25a18d94-96be-4183-b67d-8d98048ab380
Abenayan/CS144-Adv-C-Prog
HW3/hw3.main.cc
#include <iostream> #include "hw3.biguint.h" using namespace std; void func(BigUInt b) { b.SetDigit(3, 5); b.SetDigit(4, 7); cout << b << endl; } int main() { BigUInt b1(88408721); func(b1); cout << b1 << endl; string s = b1.ToString(); cout << s << endl; BigUInt b2(872); b2 += 134908571; c...
TOOL
0.950877
4.370645
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-11-12T10:56:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f168ea3a44...
1075e938-9631-4e6f-9ad6-3f957540fa5b
timmats/RayTracing
RayTracing/src/PhysicsWorld.cpp
#include "PhysicsWorld.h" void PhysicsWorld::simulate_Gravity(Scene& scene, const float dt) { m_Scene = &scene; //for (Sphere sphere : m_Scene->Spheres) for (size_t i = 0; i < m_Scene->Spheres.size(); i++) { Sphere* sphere = &scene.Spheres[i]; if (sphere->Dynamic) { sphere->Force += sphere->Mass * m_grav...
ALGO
0.936436
3.641769
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2022-10-17T12:58: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": "770d3ff0f...
a37b78d6-5a68-4d0f-b571-1802c13db745
TaeCV/Intro-to-Data-Struct
Final/practice_final/2558.cpp
1.1 a) n b) n c) 1 d) n lg n e) n lg n 1.2 a) 1,1 b) n c) 1 d) i e) 4 + (n-1) * 11 5) T operator[](int k) { node *p = mHeader->next; if (k < mSize / 2) { for (int i = 0; i < k; ++i) p = p->next; } else { k = mSize - k; p = mHeader; for (int i = 0; i < k; ...
ALGO
0.998596
3.703414
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2021-09-14T09:21:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76d926067dd...
b4765d16-5eda-4b06-b13b-baef41c11ff0
kot0ffskiy/growthpath
Algorithms/1-st contest/H_solution.cpp
#include <cmath> #include <iomanip> #include <iostream> double AverageGeom(const double* left, const double* right, const double* array) { long arr_size = right - left; const double kPowConstant = 100000.0; if (left - array > 0) { double product = *(right - 1) / *(left - 1); return sta...
ALGO
0.99963
5.049411
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2023-04-07T15:39:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "408ac95a6...
e4288743-8c59-4e8f-b1dd-f52abcbc0a81
mohammad-majoony/codeForces-submits
D. Number of Different on Segment/main.cpp
// When i wrote this code, only me and God knew how it works. Now only God knows... // https://codeforces.com/edu/course/2/lesson/4/4/practice/contest/274684/problem/D #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define MAJOONI ios_base::sync_with_stdio(0), ci...
ALGO
0.999854
5.304741
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2023-04-27T10:13:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4e958651...
8dd9139f-48e0-41de-9f38-9c7bc43e112f
khiemdo03/Junior
HashTable.cpp
#include "HashTable.h" using namespace std; HashTable::HashTable() : size(0) {} //create an instance of HashTable with the member variable size set to 0. size keeps track of how many slots are occupied in the hash table. bool HashTable::insert(int key, int index, int& collisions) { collisions = 0; //collision cou...
ALGO
0.997349
4.70357
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-09-06T19:39: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": "e32eb21cf5d9...
eb3317e2-b379-467d-9715-dfebd6059afc
qianlv/learning
threads/CplusplusConcurrencyInActionPracticalMultithreading/Eight/parallel_quicksort.cpp
/* * ===================================================================================== * * Filename: parallel_quicksort.cpp * * Description: * * Version: 1.0 * Created: 2018年07月17日 15时16分26秒 * Revision: none * Compiler: gcc * * Author: qianlv (), qianlv...
ALGO
0.999692
5.413977
{ "github_metadata": { "branch": "master", "commit_count": 287, "repo_created_at": "2015-05-14T02:27:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b984226d...
1bbd4aed-7105-4a57-83fd-dfc97ac49cc8
hpcde/spmv-acc
src/acc/hip-thread-row/thread_row_block_x_remap.hpp
// // Created by reget on 2021/8/17. // #ifndef SPMV_ACC_THREAD_ROW_BLOCK_X_REMAP_HPP #define SPMV_ACC_THREAD_ROW_BLOCK_X_REMAP_HPP #include <hip/hip_runtime.h> #include <hip/hip_runtime_api.h> #include "../common/global_mem_ops.h" #include "../common/utils.h" #include "thread_row_config.h" // calculate in a block ...
ALGO
0.990227
6.0801
{ "github_metadata": { "branch": "main", "commit_count": 420, "repo_created_at": "2021-07-30T11:54:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d240b6e06...
1fc93fb6-9250-4c72-b118-ce419d44a717
zarath8128/ScrewDriver
test.cpp
#include "Vector/Vector.h" #include "Matrix/Matrix.h" #include "BasicOperation/BasicOperation.h" #include <iostream> #include <fstream> #include <cmath> #include <cstdlib> using namespace ScrewDriver::Vector; using namespace ScrewDriver::Matrix; using namespace ScrewDriver::BasicOperation; int main(){ std::fstream f...
ALGO
0.999765
4.150204
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-10-28T03:16:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0e9b6f138...
f4e937c1-4d26-4132-8f27-de1d818eb195
KKartikeya27/s5
Assignment-1 Part-2/onedim2twodim.cpp
#include<iostream> using namespace std; int main() { int n; cout<<"Enter number of elements in 1D array: "<<endl; cin>>n; int onedim[n]; //10 (READ: G++ extensions, only possible with vectors otherwise) srand((unsigned int)time(NULL)); //SEEDING Rand() function look it up. ...
ALGO
0.900918
3.2558
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2022-08-16T11:23: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": "0bb2a5efe98...
5965b5b8-193f-4828-83b7-dc8de84e0e45
siidney/Cpp-How-To-Program-9E
Chapter21/exercises/21.36/ex_21.36.cpp
/* * ============================================================================= * * Filename: ex_21.36.cpp * * Description: Exercise 21.36 - Pig Latin * * Version: 1.0 * Created: 20/03/18 10:58:43 * Revision: none * Compiler: g++ * * Author: <NAME> - <EMA...
TOOL
0.989693
6.181126
{ "github_metadata": { "branch": "master", "commit_count": 159, "repo_created_at": "2016-03-11T11:59:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 63, "forks": 33, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "007854...