uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
bc65a03a-dbda-4900-af42-a71da65c6ef2 | vivek-30/cp-and-dsa-zone | CodeForces/Div3/Oct2022_@2/c.cpp | #include <bits/stdc++.h>
using namespace std;
#define inf 2e18
#define minf -2e18
#define mod 1000000007
#define int long long int
#define ld long double
#define all(v) v.begin(), v.end()
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef pair<int,int> pii;
typedef vector<pii> vii;
typ... | ALGO | 0.999438 | 4.13981 |
c5f089a4-cb74-4b79-9593-6b9f63223367 | msiedlarek/minimal-linux | src/llvm/llvm/lib/TableGen/StringMatcher.cpp | #include "llvm/TableGen/StringMatcher.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <map>
#include <string>
#include <utility>
#include <vector>
using namespace llvm;
/// FindFirstNonCommonLetter - Find the first character ... | TOOL | 0.948451 | 7.345655 |
d30e3a99-6a64-4bc5-97a6-11435789f0e4 | coding-blocks-archives/AlgoNoidaS19 | Lecture-1/IntToString.cpp | #include <iostream>
using namespace std;
string s[10]={
"zero","one","two","three","four","five","six","seven","eight","nine"
};
void StringToInt(int n){
if(n==0){
return;
}
int digit = n%10;
StringToInt(n/10);
cout<<digit<<" ";
}
int main(){
int n;
cin>>n;
StringToInt(n);
cout<<endl;
return 0;
} | ALGO | 0.999436 | 4.316981 |
4e65af31-1957-453b-a02b-7cc1511624c2 | PC-DOS/SEUCPP-OJ-KEYS | Contest 1009/D.cpp | #include <iostream>
#include <iomanip>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <vector>
using namespace std;
int a[7], i;
bool isExist(int n, int ptr){
int j;
for (j = 0; j <= ptr - 1; ++j){
if (a[j] == n)
return true;
}
return false;
}
int... | ALGO | 0.998733 | 3.335686 |
f3c0a7fd-679d-48b9-8ebc-bd826a4afcf3 | JOYBOY1O1/Cpp_programming | DSA_DAA/LinearSearch.cpp | #include <bits/stdc++.h>
using namespace std;
int LinearSearch(int A[], int size, int key)
{
for (int i = 0; i < size; i++)
{
if (A[i] == key) return i;
}
return -1;
}
int main()
{
int size,key;
cout<<"Enter array size: ";
cin>>size;
int A[size];
for(int i=0;i<size;i++)... | ALGO | 0.998621 | 4.985816 |
478bc652-550d-487d-a89a-44c413ffa9bc | felipebarichello/PX4-Autopilot-ColAvoid | src/lib/pid/pid.cpp | /**
* @file pid.c
*
* Implementation of generic PID controller.
*
* @author Laurens Mackay <<EMAIL>>
* @author Tobias Naegeli <<EMAIL>>
* @author Martin Rutschmann <<EMAIL>>
* @author Anton Babushkin <<EMAIL>>
* @author Julian Oes <<EMAIL>>
*/
#include "pid.h"
#include <math.h>
#include <px4_platform_common/... | ALGO | 0.998212 | 6.514546 |
1c53dc44-0353-4e7b-a193-8ec66d80e002 | Harmanjaggi/leet_code | generate_parentheses.cpp | #include <iostream>
#include <vector>
using namespace std;
void display(vector<string> arr)
{
for (string ele : arr)
cout << ele << endl;
cout << endl;
}
void generateParenthesis(int open, int close, string str, vector<string> &ans)
{
if (open == 0 && close == 0)
ans.push_back(str);
if ... | ALGO | 0.999762 | 5.27389 |
bff34605-52fa-40fd-88b2-33916969f34e | pemesteves/IEEEXtreme2019 | MinimumPermutation/main.cpp | #include <iostream>
#include <vector>
#include <set>
using namespace std;
int main() {
unsigned int n, m;
cin >> n >> m;
vector<unsigned int> a;
set<unsigned int> sort_s;
unsigned int a_elem, s_elem;
while(n > 0){
cin >> a_elem;
a.push_back(a_elem);
n--;
}... | ALGO | 0.999974 | 3.532769 |
425e8db6-8921-48bc-b1c7-7b8c05fbd7c5 | kimdemnjji/DataStructure | 항상 옳은 길만 출력하는 미로찾기 과제/report1.cpp | #include "Location2D.h"
#include <iostream>
#include <stack>
#include <windows.h>
using namespace std;
const int MAZE_SIZE = 6;
char map[MAZE_SIZE][MAZE_SIZE] = {
{'1', '1', '1', '1', '1', '1'},
{'e', '0', '1', '0', '0', '1'},
{'1', '0', '0', '0', '1', '1'},
{'1', '0', '1', '0', '1', '1'},
{'1', '0... | ALGO | 0.999905 | 3.336666 |
4b781f7c-85d2-49f5-9b9d-6e5c14667666 | ishandutta2007/codeforces | ghastlcon/normal/896/C.cpp | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <map>
#include <utility>
#define N 100020
#define int unsigned long long
using namespace std;
int s;
int a[N];
map<int, int> f;
vector<pair<int, int> > v;
int Rand(void)
{
int o;
o = s;
s = (s * 7 + 13) % 1000000007;
... | ALGO | 0.999874 | 4.010377 |
84b3501c-fae7-4c04-97b9-2c53cafc42bd | ngthanhtrung23/CompetitiveProgramming | codeforces/100002/D.cpp |
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a),_b=(b); i<=_b; ++i)
#define FORD(i,a,b) for(int i=(a),_b=(b); i>=_b; --i)
#define REP(i,a) for(int i=0,_a=(a); i < _a; ++i)
#define DEBUG(X) { cout << #X << " = " << X << endl; }
#define PR(A,n) { cout << #A << " = "; FOR(_,1,n) cout << A[_] << ' '; cout << e... | ALGO | 0.999858 | 4.195877 |
6ad3b5ea-7bea-46b1-ac3c-7217de9a1c76 | yarrostyk/ConsoleApplicationYarovyiRostyk26.06 | ConsoleApplicationYarovyiRostyk26.06/ConsoleApplicationYarovyiRostyk26.06.cpp | #include <iostream>
#include "Windows.h"
#include <string>
using namespace std;
struct Library {
int year;
string address;
string name;
string owner;
int maxCustomers;
};
struct Book {
string name;
string author;
int year;
int countPages;
string genre;
};
//
void addBook(Boo... | TOOL | 0.929343 | 3.951202 |
01654e95-62ba-41c2-ada7-79de81359d77 | biomachina-lab/Sculptor | svt/core/src/svt_quadric.cpp | /***************************************************************************
svt_quadric - description
-------------------
begin : 07.02.2003
author : Maik Boltes
email : <EMAIL>
***************************... | ALGO | 0.999581 | 5.144857 |
121e5b08-b663-43ac-83ff-0df202709441 | mairesol/Data-structure-and-algorithm | Generation/bit.cpp | #include <iostream>
#include <string>
using namespace std;
void bit_generator(int n)
{
string bit(n, '0');
int i;
while (true)
{
cout << bit << endl;
i = n - 1;
while (i >= 0 && bit[i] == '1')
i--;
if (i == -1)
return;
bit[i] = '1';
... | ALGO | 0.999915 | 3.759044 |
5c11c5f1-a8a1-4c00-82a1-4ce92bc0bc87 | Samir55/Algorithms-Course | Sort/heap_sort.cpp | #include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <cmath>
#include <cstring>
using namespace std;
#define lp(i, n) for(int i=0;i<(int)(n);++i)
/// Heapify function: create the max heap from the vector of elemet... | ALGO | 0.999737 | 4.800836 |
a0a61d50-4611-4310-a38b-a8ddfd22f29a | ayushman-777/Coding | wordBreak_trie.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:
// A : given string to search
// B : vector of available strings
struct Node {
Node *arr[26];
bool flag = false... | ALGO | 0.999712 | 5.911641 |
c9dfb352-ce16-4d2b-9747-05e3c3e1eaea | PMBio/limix | src/limix/utils/beta.cpp | #include "limix/utils/beta.h"
#include "limix/utils/gamma.h"
//#include <math.h>
//does tis work on windows?
#include <cmath>
namespace stats {
// Beta distribution
// See: http://en.wikipedia.org/wiki/Beta_distribution
/// <summary>Beta distribution</summary>
/// <summary>Cumulative distribution function</summar... | ALGO | 0.997285 | 5.984544 |
5f8919d7-860b-4a9c-9fbc-1622789f7f63 | tangziyi001/competitive-programming | Greedy/RadarInstallation.cpp | /*
* UVA 1193
* Created by Ziyi Tang
*
*/
//#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queu... | ALGO | 0.999751 | 3.526797 |
1eae4279-22bc-4941-85fa-1785ce9e5e01 | ankishb/Algorithm-DS-Problems | trees/find_bottom_left_most_tree_value.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
int level_order_tran(TreeNode* root){
queue<TreeNode*> q;
q.push(root);
q.push(NULL);
TreeNode* top;
while(true){
if(... | ALGO | 0.999999 | 6.45897 |
a8e1f41c-55ee-462f-9c29-33ae3adee1e5 | Ksenia-Voronina/Algorithms_and_Data_Structures | lab1/Stack.cpp | #include <iostream>
#include <conio.h>
#include <windows.h>
#include <string>
using namespace std;
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
// Определяем емкость stack по умолчанию
#define SIZE 10
template <typename T>
class Stack
{
T* arr;
int top;
int capacity;
public:
Stack(int); // ко... | TOOL | 0.91824 | 3.789974 |
f020993c-76b6-4dde-8f25-ff4818d4f1d5 | atalariq/cp | problems/TLX/courses-basic/9-array/e-perkalian_matriks.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, P;
cin >> N >> M >> P;
int A[N][M], B[M][P], C[N][P];
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> A[i][j];
}
}
for (int i = 0; i < M; i++) {
for (int j = 0; j < P; j++) {
cin >> B[i][j];
... | ALGO | 0.999347 | 3.279106 |
ae7218ce-f75b-4956-ad97-83bb5718c30a | cs-au-dk/Artemis | contrib/Z3/lib/defined_names.cpp | #include"defined_names.h"
#include"used_vars.h"
#include"var_subst.h"
#include"ast_smt2_pp.h"
#include"ast_pp.h"
defined_names::impl::impl(ast_manager & m, char const * prefix):
m_manager(m),
m_exprs(m),
m_names(m),
m_apply_proofs(m) {
if (prefix)
m_z3name = prefix;
}
defined_names::impl::... | TOOL | 0.851079 | 6.451413 |
abc17c88-f198-4cd9-bbe5-5e0eab91092d | npnkhoi/Competitive-programming | GYM/101652/P_BF.cpp | #include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define mp make_pair
#define REP(i,n) for (int i = 0; i < (n); ++ i)
#define FOR(i,a,b) for (int i = (a); i <= (b); ++ i)
#define FORD(i,b,a) for (int i = (b); i >= (a); -- i)
#define debug(x) cerr << #x << ": " << x << "\n"
#define all(x) x... | ALGO | 0.999446 | 3.188224 |
576fa6e2-401c-41d0-8b8e-dc66a90bb5db | prkhr21/CPP_Basics | functions.cpp | //This program is to understand functions.
#include<iostream>
using namespace std;
int sum(int,int); //Function prototype.
int main()
{
int num1,num2;
cout<<"Enter 1st no.-"<<endl;
cin>>num1;
cout<<"Enter 2nd no.-"<<endl;
cin>>num2;
cout<<"sum = "<<sum(num1,num2)<<endl;
return 0;
}
int... | TOOL | 0.988619 | 4.818011 |
cb651940-b16e-4dad-86f4-152fe8263e62 | ishandutta2007/codeforces | somuchdrama/normal/812/E.cpp | #pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#include <bits/stdc++.h>
using std::cerr;
using std::cin;
using std::cout;
using std::abs;
using std::min;
using std::max;
using std::swap;
using std::map;
using std::pair;
using std::set;
using std::string;
using std::vector... | ALGO | 0.999894 | 3.750568 |
02c49abd-aac8-4f2c-a4c9-7d25796874da | g-gisbert/Inpainting-Holes-In-Folded-Fabric-Meshes | deps/libIGL/include/igl/deform_skeleton.cpp | void igl::deform_skeleton(
const Eigen::MatrixXd & C,
const Eigen::MatrixXi & BE,
const std::vector<
Eigen::Affine3d,Eigen::aligned_allocator<Eigen::Affine3d> > & vA,
Eigen::MatrixXd & CT,
Eigen::MatrixXi & BET)
{
using namespace Eigen;
assert(BE.rows() == (int)vA.size());
CT.resize(2*BE.rows(),C.co... | ALGO | 0.994852 | 5.389054 |
8ff6427b-79c2-44bc-9be4-263f27e1dda3 | Chan531/BaekJoon_Online_Judge | Metronome.cpp | #include <iostream>
using namespace std;
double n;
void input()
{
cin >> n;
}
void solution()
{
cout << fixed;
cout.precision(2);
cout << n / 4;
}
void solve()
{
input();
solution();
}
int main(void)
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
solve();
return 0;
} | ALGO | 0.999212 | 3.263211 |
b375b572-8d69-4c14-9f52-3be073323209 | Mubeen213/cpp-problem-solving | arrays/min_pos_step.cpp | #include<iostream>
#include<climits>
using namespace std;
int minStartValue(vector<int>& nums) {
int runningSum = 0, minValue = 0;
for(int num: nums) {
runningSum += num;
minValue = min(minValue, runningSum);
}
return (1-minValue);
}
| ALGO | 0.999328 | 4.91748 |
3f58101e-3b27-4d0b-8597-fd44bcbf08e4 | Harshit-Verma-Official/Data-Structures-and-Algorithms | Dynamic Programming/FriendsPairingProblem.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
int countFriendsPairings(int n) {
if (n <= 2)
return n;
int mod = 1000000007;
int a = 1, b = 2, c = 0;
for (long long i = 3; i <= n; ++i) {
c = ((b % mod) + ((i - 1... | ALGO | 0.999981 | 5.614854 |
21ea0cf4-5eb3-4e68-953e-be51f54dd958 | TwinterT/PAT-programs | A1132_20.cpp | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
typedef long long LL;
int n;
bool judge(char data[])
{
int len=strlen(data);
LL a=0,b=0,pre=0;
int i=0;
for(;i<len/2;i++)
{
a=a*10+(data[i]-'0');
pre=pre*10+(data[i]-'0');
}
for(;i<len;i++)
{
b=b*10+(data[i]-'0');
pre=pre*10+(data[i]-'0');
}
i... | ALGO | 0.999698 | 3.623933 |
12933280-97ee-4557-bd9f-b958edaec445 | intectum/games | astrum/src/physics/point_masses.cpp | #include "../types.h"
#include "point_masses.h"
#include "util.h"
namespace astrum
{
void simulate_point_mass_physics(ludo::instance& inst, const std::vector<std::string>& kinematic_partitions)
{
auto& kinematic_bodies = ludo::data<ludo::kinematic_body>(inst);
auto& static_bodies = ludo::data<ludo::static_... | TOOL | 0.914296 | 6.406112 |
33e229df-ac41-4537-bd97-3797c29e36b1 | sushil579/programs | cheappal.cpp | //https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/make-the-cheapest-palindrome-1/description/
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t,i,b,acost,bcost,j;
long long int cost=0;
char str[100001];
scanf("%d",&t);
f... | ALGO | 0.997764 | 3.220538 |
b8a8ebf7-9f26-42e5-aede-7ce9c28903e3 | cbkpar/BOJ | boj_3285.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
string strKey;
cin >> strKey;
int iN;
cin >> iN;
int iNow = iN - 1;
vector<int> vecDecode(26, 0);
vector<bool> vecUse(26, false);... | ALGO | 0.999985 | 4.522176 |
50f7e5cc-421b-43f2-beae-f81550c37a37 | ishandutta2007/codeforces | yuu/normal/898/D.cpp | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, j, k) for(int i=j; i<=k; i++)
#define FFOR(i, j, k) for(int i=j; i<k; i++)
#define DFOR(i, j, k) for(int i=j; i>=k; i--)
#define bug(x) cerr<<#x<<" = "<<x<<'\n'
#define pb push_back
#define mp make_pair
#define setbit(s, i) (s|=(1LL<<(i)))
#define bit(s, i) (... | ALGO | 0.999981 | 3.669528 |
9214faa2-115d-4466-aebe-bd34d68b2582 | and-gue/NeaTS | lib/sdsl-lite/tutorial/expl-17.cpp | #include <iostream>
#include <sdsl/csa_bitcompressed.hpp>
#include <sdsl/suffix_array_algorithm.hpp>
using namespace std;
using namespace sdsl;
int main()
{
csa_bitcompressed<> csa;
construct_im(csa, "abracadabra", 1);
cout << "csa.size(): " << csa.size() << endl;
cout << "csa.sigma : " << csa.sigma ... | ALGO | 0.99918 | 3.627921 |
4a02cf15-e33c-4d8e-880c-bbf785d55c8a | shelltdf/osgall | prebuild/boost_1_82_0/libs/compute/perf/perf_set_union.cpp | #include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
#include <boost/compute/system.hpp>
#include <boost/compute/algorithm/set_union.hpp>
#include <boost/compute/container/vector.hpp>
#include "perf.hpp"
int rand_int()
{
return static_cast<int>((rand() / double(RAND_MAX)) * 25.0);
}
int... | ALGO | 0.980838 | 5.67954 |
08ab53dc-0f90-48ba-8f6f-c33bb6e00d30 | ishandutta2007/codeforces | ifsmirnov/normal/713/C.cpp | #include <bits/stdc++.h>
using namespace std;
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define fore(i, b, e) for (int i = (int)(b); i <= (int)(e); ++i)
#define ford(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define pb push_back
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
ty... | ALGO | 0.99998 | 3.88935 |
c60c383a-b0f6-48c4-ae93-7f5a65031018 | toufu-24/AtCoder | ABC/ABC353/A.cpp | #include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define all(v) v.begin(), v.end()
#define SORT(v) sort(v.begin(), v.end())
#define RSORT(v) sort(v.rbegin(), v.rend())
#define REVERSE(v) reverse(v.begin(), v.end())
#define ll long
#define ld long double
#define int ll
int... | ALGO | 0.999968 | 5.034572 |
141ad392-64b6-41e8-a612-502a732ce1f3 | Beast-Alok/gfg-potd | 09 September (2024)/September_21th.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
#include <iostream>
#include <map>
#include <sstream>
#include <vector>
using namespace std;
/* Link list Node */
struct Node {
int data;
Node *next;
Node *random;
Node(int x) {
data = x;
next = NULL;
random = NULL;
}
};
voi... | ALGO | 0.998038 | 5.301752 |
96244a80-5b61-42b7-924b-ad1cdbe92948 | Swan-Maria/PP-Code | Задача 7.cpp | // Задача 7.cpp : Реалізуйте підрахунок чисел Фібоначчі.
#include <iostream>
int fibonacci(int n);
int main() {
int n;
std::cout << "Enter a number: ";
std::cin >> n;
int result = fibonacci(n);
std::cout << "Fibonacci number for n = " << n << " is: " << result << std::endl;
return 0;
}
int ... | ALGO | 0.999694 | 5.072061 |
e2d3668a-bf11-4515-a401-679a8c7c6a41 | TinoTano/Games_Factory_2D | Old/Source/md5.cpp | /* interface header */
#include "md5.h"
/* system implementation headers */
#include <cstdio>
// Constants for MD5Transform routine.
#define S11 7
#define S12 12
#define S13 17
#define S14 22
#define S21 5
#define S22 9
#define S23 14
#define S24 20
#define S31 4
#define S32 11
#define S33 16
#define S34 23
#define S... | ALGO | 0.998055 | 6.65576 |
a1cb51c5-d99b-4fd6-87bb-d634ba4e174b | hossainruetcse/CodesAlgoritms | Dinic Maxflow Class/dinic.cpp | //! Bismillahi-Rahamanirahim.
// Adjacency list implementation of Dinic's blocking flow algorithm.
// This is very fast in practice, and only loses to push-relabel flow.
//
// Running time:
// O(|V|^2 |E|)
//
// INPUT:
// - graph, constructed using AddEdge()
// - source
// - sink
//
// OUTPUT:
// -... | ALGO | 0.993414 | 4.761943 |
e6de337e-67bc-4853-bedd-3246f3528cb7 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_5157_1.cpp | #include <bits/stdc++.h>
int getward(int dx, int dy);
int getward(int dx, int dy) {
if (dx > 0) return 1;
if (dy > 0) return 2;
if (dx < 0) return 3;
if (dy < 0) return 4;
return 0;
}
int check(int w, int ww);
int check(int w, int ww) { return (w % 4 + 1 == ww); }
int main(int argc, const char* argv[]) {
in... | ALGO | 0.999894 | 4.305216 |
50c0f98e-4865-4a59-b7e7-156bfc356f3b | avdhut0923/tcs_sheet | 0.arrays/16symmetric_pair.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int n=5;
int arr[5][2]={{2,1},{3,4},{1,2},{4,3},{4,4}};
unordered_map<int,int>mp;
for(int i=0;i<n;i++){
int first = arr[i][0];
int second = arr[i][1];
// second is compared with all keys in map
if(mp.find(secon... | ALGO | 0.999844 | 4.114398 |
4fe3f8e3-3932-4907-98bf-f8e56ca66a25 | hzqtc/zoj-solutions | src/zoj3168.cpp | #include <iostream>
#include <string>
using namespace std;
int main()
{
string line;
while(cin >> line)
{
int z = 0, o = 0, j = 0, s = 0;
int l = line.length();
int i;
string rest = "";
for(i = 0; i < l; i++)
{
switch(line[i])
{
case 'Z':
z++;
break;
case 'O':
o++;
break;
... | ALGO | 0.945139 | 3.27708 |
169a7813-8723-432b-9672-7088f0254c98 | RaianRashidRimon/Algorithms | String Matching/Rabin Karp.cpp | #include <bits/stdc++.h>
using namespace std;
vector<int> RabinKarp(string const& pattern, string const& text)
{
const int p = 37;
const int m = 1e9 + 7;
int pattern_size = pattern.size(), text_size = text.size();
vector<long long> p_pow(max(pattern_size, text_size));
p_pow[0] = 1;
for (int i =... | ALGO | 0.999927 | 5.987193 |
5151d8fc-b94f-4ee7-b7d6-9f8b01da9c87 | jiahy0825/Leetcode_SecondRound | LeetCode/691-Stickers to Spell Word.cpp | #include<iostream>
#include<cstdio>
#include<stdio.h>
#include<string>
#include<cstring>
#include<string.h>
#include<queue>
#include<stack>
#include<vector>
#include<unordered_map>
#include<unordered_set>
#include<map>
#include<set>
#include<algorithm>
#include<functional>
#include<climits>
using namespace std;
class... | ALGO | 0.999795 | 4.279406 |
632ef1f6-e380-4e6f-adf1-d6aa17748f48 | TAUSEEF-01/2-1_DSA_Lab_Tasks | DSA codes/GFG/Print all possible strings of length k.cpp | // C++ program to print all
// possible strings of length k
#include <bits/stdc++.h>
using namespace std;
// The main recursive method
// to print all possible
// strings of length k
void printAllKLengthRec(char set[], string prefix,
int n, int k)
{
// Base case: k is 0,
// print prefix
if (k == 0)
{
... | ALGO | 0.998395 | 5.52894 |
b920730b-364f-4294-a4ce-f1855b5eab37 | laizhongti/-c- | Cpp分数求和.cpp | #include<stdio.h>
int main()
{
int i;
double sum=0.0;
int flag=1;
for(i=1;i<=100;i++)
{
sum+=flag*1.0/i;
flag=-flag;
}
printf("%lf\n",sum);
return 0;
} | ALGO | 0.999717 | 3.280758 |
ff8fca2b-b217-4f32-a29b-5dba64fb983c | UsamG1t/Graph_AStar | src/graph_elements.cpp | #include <utility>
#include <iostream>
#include "graph_elements.hpp"
Arc_params::Arc_params(unsigned t, unsigned g, unsigned r):
time(t), green(g), red(r){}
Arc_params::Arc_params(Arc_params&& other) {
std::swap(this->time, other.time);
std::swap(this->green, other.green);
std::swap(this->red, ot... | TOOL | 0.887313 | 4.579 |
8f4dcc7d-e46a-4f35-a388-271f4b7e3ea8 | gaurav-310/OATCP | Lab 1/2.cpp | // Grid Path Problem
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve()
{
int M = 1e9 + 7;
int n;
cin >> n;
vector<vector<char>> v(n, vector<char>(n, 0));
vector<vector<int>> dp(n, vector<int>(n, 0));
for (int i = 0; i < n; i++)
{
for (int j = 0; j < ... | ALGO | 0.999949 | 5.401393 |
9cba7654-011e-4877-be3b-0cc89410d7b9 | Hinski2/CP | codeforces/problems/Promo/cpp994.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T>
std::ostream& operator<<(std::ostream& os, const std::vector<T>& v){
for(const auto &u: v){
os << u << ' ';
}
return os;
}
te... | ALGO | 0.999907 | 4.011795 |
302ce46a-2784-43c5-a1ee-e8c8889f1d4c | pmSaurabhp/programs | 450 sheet/DP/rod_cutting_dp.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int costofCut(vector<int> store,int i,int l,int h)
{ if(i==store.size())
return 0;
int a=0,b=0;
if(store[i]>l && store[i]<h)
{ a = costofCut(store,i+1,l,store[i]);
b = costofCut(store,i+1,store[i],h);
}
else
... | ALGO | 0.999711 | 4.830136 |
ea0f1b70-f929-4d39-9aac-1d357959a6b0 | chocomacaroon/baekjoon | 프로그래머스/0/181919. 콜라츠 수열 만들기/콜라츠 수열 만들기.cpp | #include <string>
#include <vector>
using namespace std;
vector<int> solution(int n) {
vector<int> answer;
while(n!=1){
answer.push_back(n);
if(n%2==0){
n/=2;
}
else{
n = 3*n+1;
}
}
answer.push_back(1);
return answer;
} | ALGO | 0.999936 | 5.898122 |
d69b6e41-a78d-4ed3-bebe-07d26fd813ce | rbacon4/coh-original-server-vs2010 | 3rdparty/nvparse/src/tools/nvparse/vcp1.0_impl.cpp |
#include "nvparse_errors.h"
#include "nvparse_externs.h"
#include <string.h>
#include <string>
#define GLEW_STATIC
#include <GL/glew.h>
#ifndef _WIN32
# define strnicmp strncasecmp
#endif
using namespace std;
namespace
{
void ParseVertexProgramConstants( GLenum target, char *instring);
GLuint LookupTrackMatrix(c... | TOOL | 0.94352 | 5.274311 |
6dc376f4-97d6-4534-92c3-f9af88849548 | JosephKJ/DeepLab | deeplab_caffe/src/caffe/util/permutohedral.cpp | #include "caffe/util/permutohedral.hpp"
#ifdef WIN32
static float round( float v ) {
return floor( v+0.5f );
}
#endif
/************************************************/
/*** Hash Table ***/
/************************************************/
class HashTable{
protected:
size_t key_siz... | ALGO | 0.997766 | 6.629855 |
f2ed10fc-3699-4c93-842b-1adc0fdbebf0 | ishandutta2007/codeforces | zhukov_dmitry/normal/1671/B.cpp | #include <stdio.h>
#include <bits/stdc++.h>
#include <cstdint>
#include <ctime>
#include <functional>
#include <limits>
#include <random>
#include <string_view>
#include <type_traits>
#include <utility>
#ifdef ROOM_311
# ifndef OLYMP_DEBUG
# define OLYMP_DEBUG
# endif
#else
# define OLYMP_NDEBUG
#endif
//#include <o... | ALGO | 0.999716 | 4.398086 |
5e6d6aaf-347c-4bd9-abb3-7a8fde68f922 | warzes/RPGInBox | src/Game/Frustum.cpp | #include "stdafx.h"
#include "Frustum.h"
#include "DebugNew.h"
//-----------------------------------------------------------------------------
inline void normalizePlane(Vector4& plane) noexcept
{
const float magnitude = sqrtf(plane.x * plane.x + plane.y * plane.y + plane.z * plane.z);
plane.x /= magnitude;
plane.y ... | ALGO | 0.992344 | 6.300628 |
35f00380-00f9-46a2-a2af-f08f63e22aa1 | naimulcsx/online-judge-solutions | Codeforces/208A - Dubstep.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
// freopen("files/input.txt", "r", stdin);
// freopen("files/output.txt", "w", stdout);
string s;
cin >> s;
while(s.find("WUB") != string::npos) {
size_t pos = s.find("WUB");
s.erase(pos, 2);
s.at(pos) = ' ';
}
... | ALGO | 0.999792 | 3.188833 |
6106731a-5e9a-4ca2-aa68-525968d2be2a | theFPVgeek/Tevo-Tarantula-Marlin-1.1-RC7-BugFix- | Marlin-Titan-NoAutolevel-XHomeMax/qr_solve.cpp | #include "qr_solve.h"
#if ENABLED(AUTO_BED_LEVELING_GRID)
#include <stdlib.h>
#include <math.h>
//# include "r8lib.h"
int i4_min(int i1, int i2)
/******************************************************************************/
{
return (i1 < i2) ? i1 : i2;
}
double r8_epsilon(void)
/***************************... | ALGO | 0.999953 | 5.65379 |
d7677464-0175-4444-b3e2-d12fb2b0d668 | RafiAthallahN/LiterallyLatihanLogika-C- | test2.cpp | #include <iostream>
using namespace std;
int main(){
int bil;
cout<<"Masukan Bilangan : ";
cin>>bil;
if (bil%2==0){
cout<<"genap";
}else {
cout<<"ganjil";
}
} | ALGO | 0.999364 | 3.420601 |
cc92e24b-053c-4d76-8740-8debaf75519c | qixin777/PAT- | 基础编程题目集/6-3.cpp | #include <stdio.h>
#define MAXN 10
int Sum ( int List[], int N );
int main ()
{
int List[MAXN], N, i;
scanf("%d", &N);
for ( i=0; i<N; i++ )
scanf("%d", &List[i]);
printf("%d\n", Sum(List, N));
return 0;
}
int Sum ( int List[], int N ){
int sum=0;
for ( int i=0; i<N; i++ ){
sum+=Lis... | ALGO | 0.999236 | 3.707508 |
112e6c5f-1053-4d61-bba1-77dd41257634 | JoseOrtega51/ValuationLibrary | ValuationLibrary/FixedIncome.cpp | #include "FixedIncome.h"
namespace ValLry{
///////////////////////////////////
// bond
///////////////////////////////////
double bond::getNominal(){
return _nominal;
}
double bond::getMaturity(){
return _maturity;
}
double bond::getYTM(){
return _YTM;
}
... | TOOL | 0.869105 | 7.385891 |
bea20a89-8a76-4ee6-a945-5098be7bcdea | warrenjl/KSBound | src/w_update.cpp | #include "RcppArmadillo.h"
#include "KSBound.h"
using namespace arma;
using namespace Rcpp;
// [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::export]]
Rcpp::List w_update(arma::vec y,
arma::mat x,
int n,
arma::vec off_set,
arma::vec tri_als,... | ALGO | 0.999667 | 4.471417 |
d366c755-7459-4527-a3b1-498dcde93f8b | ishandutta2007/codeforces | sexpert/normal/798/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
vector<int> dp[2];
const int INF = 1e9;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<int> v(n);
int g = 0;
int odd = 0;
for(auto &x : v) {
cin >... | ALGO | 0.999972 | 3.644372 |
71675923-2b8f-4b08-bb7c-9a92c4a5474c | jiyun0205/study | 백준/그리디 알고리즘/조건문/2884.cpp | #include <stdio.h>
int main()
{
int H, M;
scanf("%d %d", &H, &M);
int new_M = M - 45;
if(new_M < 0)
{
H -=1;
if(H < 0)
{
H = 23;
}
new_M = 60 + new_M;
}
printf("%d %d", H, new_M);
return 0;
} | ALGO | 0.999871 | 4.344187 |
cbfd64b6-8f24-4dc3-b9e9-b249ddefd3c5 | bcmissrain/HeroCat | 100Hero/cocos2d/cocos/platform/winrt/CCFileUtilsWinRT.cpp | #include "CCFileUtilsWinRT.h"
#include <regex>
#include "CCWinRTUtils.h"
#include "platform/CCCommon.h"
using namespace std;
NS_CC_BEGIN
static std::string s_pszResourcePath;
// D:\aaa\bbb\ccc\ddd\abc.txt --> D:/aaa/bbb/ccc/ddd/abc.txt
static inline std::string convertPathFormatToUnixStyle(const std::string& path)
{... | TOOL | 0.900437 | 6.241236 |
f48d8550-f30e-41d8-875c-52e771ffbc3f | HUSTERGS/HUSTCS | 汇编/code_3/bc31/DISK_C/BORLANDC/CLASSLIB/SOURCE/SORTARRY.CPP | /*------------------------------------------------------------------------*/
/* */
/* SORTARRY.CPP */
/* */
/* ... | ALGO | 0.991697 | 5.947699 |
79a04212-d8c9-43cd-bff5-cea5c225c2af | a3a256/Wars-on-CodeWars | 6 kyu/Roman Numerals Decoder/solution.cpp | #include <iostream>
#include <string>
#include <map>
#include <algorithm>
using namespace std;
int solution(string roman) {
map<char, int> mp = {{'I', 1}, {'V', 5}, {'X', 10}, {'L', 50},
{'C', 100}, {'D', 500}, {'M', 1000}};
int i, res, prev;
res = 0;
prev = 0;
for(i=roman.size()-1; i>... | ALGO | 0.999938 | 5.662295 |
f3e9f478-0c24-4996-b688-0f4119221dd7 | hieu-ln/IT02-03 | BTCN_NguyenToanMy/Bai11_chuong2.cpp | #include<iostream>
#include<conio.h>
using namespace std;
#define MAX 100
struct Node
{
int info;
Node* link;
};
Node* front, * rear;
void init()
{
front = NULL;
rear = NULL;
}
int isEmpty()
{
if (front == NULL)
{
return 1;
}
return 0;
}
void Push(int x)
{
Node* p;
p = new Node;
p->info = x;
p->link =... | ALGO | 0.972636 | 3.660873 |
1a6f03b4-958b-43ed-b444-267c6067b81c | qk12/ACM | Math/LightOJ/1259-哥德巴赫猜想.cpp | #include <iostream>
using namespace std;
const int maxn = 1e7;
int prime[664588]; //存素数
bool is_prime[maxn + 1]; //判定素数
int getPrime(int n) //返回n以内素数的个数
{
int cnt = 0;
for (int i = 0; i <= n; ++i)
is_prime[i] = true;
is_prime[0] = is_prime[1] = false;
for (int i = 2; i <= n; i++)
{
... | ALGO | 0.999331 | 4.306662 |
e0ca0b2f-2490-4e67-86c0-a6226ea104de | singlarohan/leetcode_sol | 0143-reorder-list/2022-09-30 02.17.13 - Accepted - runtime 101ms - memory 17.8MB.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) {}
* };
*/
class Solution {
public:
ListNode *reverse_rec... | ALGO | 0.999972 | 5.650215 |
9aca9023-8171-4b76-8733-98d35fb68ca3 | pradeeptosarkar/LeetCode | LeetCode/problems/next_greater_element_i/solution.cpp | class Solution {
public:
vector<int> nextGreaterElement(vector<int>& nums1, vector<int>& nums2)
{
int n=nums2.size();
unordered_map<int,int> mp;
stack<int> stk;
for(int i=n-1;i>=0;i--)
{
while(!stk.empty() and stk.top()<nums2[i])
stk.... | ALGO | 0.999903 | 5.858036 |
450abca1-c2c3-4824-8c3f-a5370f115794 | El-limon-mecanico/Quack-Engine | QuackEngineSol/dependencies/Ogre/Src/Samples/EndlessWorld/src/PerlinNoiseTerrainGenerator.cpp | #include <stdlib.h>
#include <math.h>
#include "OgreMath.h"
#include "PerlinNoiseTerrainGenerator.h"
using namespace Ogre;
#define BM 0xff
#define N 0x1000
#define NP 12 /* 2^N */
#define NM 0xfff
PerlinNoiseTerrainGenerator::PerlinNoiseTerrainGenerator(const Real& alpha, const Real& beta, int iterationNum, const ... | ALGO | 0.993291 | 4.663937 |
5d0e744b-3fc9-4cc2-8fa4-1945db7d5616 | hakomori64/atcoder | jsutc202004/b.cpp | #include <bits/stdc++.h>
#define rep(i, n) for(ll i = 0; i < n; i++)
#define repr(i, n) for(ll i = n; i >= 0; i--)
#define inf LLONG_MAX
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
int main()
{
ll n; cin >> n;
vll r,b;
rep(i... | ALGO | 0.999581 | 3.688797 |
8f4b8ef2-bc5a-4883-a611-eb0affe87dec | AndyChenYH/leetcode | 4sum.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> ar = {1, 2, 3, 4, 5};
int t = 14;
int N = ar.size();
int k = 4;
vector<int> ind;
for (int c = 0; c < k - 2; c ++) {
ind.push_back(c);
}
vector<int> upp;
for (int c = 0; c < k - 2; c ++) {
upp.push_back(N - c);
}
int lop = 0;
while (... | ALGO | 0.999773 | 3.909583 |
a5f45751-a316-4c64-bad3-c42dccf9d310 | Ale083/LeetCode | 4_MedianOfTwoSortedArrays/main.cpp | #include <iostream>
#include <vector>
using namespace std;
double findMedianSortedArrays(vector<int>& arr1, vector<int>& arr2);
double medianSortedArray(vector<int>& arr);
int max(int n1, int n2);
int main() {
vector<int> arr1;
vector<int> arr2 = {1};
double median = findMedianSortedArrays(arr1, arr2);
... | ALGO | 0.999852 | 5.217465 |
56727a6a-d92e-4fcc-985b-284c7d7c00ad | kimixuchen/leetcode | LeetCode-350-Intersection of Two Arrays II-Easy.cpp | /*
LeetCode-350-Intersection of Two Arrays II
16/11/16 09:06:46
xuchen
**/
#include <iostream>
#include <sstream>
#include <cfloat>
#include <cctype>
#include <unordered_set>
#include <unordered_map>
#include <set>
#include <cmath>
#include <vector>
#include <map>
#include <cmath>
#include <string>
#include <algorithm... | ALGO | 0.999955 | 5.31373 |
2926c4d0-285d-45da-8222-3967e63635e3 | youknowwhoiam1/CP-Solutions | CodeChef/C++14/BIGARRAY/51084768.cpp | #include <bits/stdc++.h>
#include <string>
#define int long long
#define NFS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define all(x) (x).begin(), (x).end() //Forward traversal
#define pb push_back
#define fi first
#define se second
#define max3(a,b,c) max(max((a),(b)),(c))
#define max4(a,b,c,d) max... | ALGO | 0.999952 | 4.129575 |
5eb53106-f5cf-4a64-b3e6-d03e02638fe8 | umangja/CompetitiveProgrammingSolution | codeforces/1293/D.cpp | /*input
*/
//assic value of ('0'-'9') is(48 - 57) and (a-z) is (97-122) and (A-Z) is(65-90) and 32 for space
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define pii pair<ll int,ll int>
#define vpii vector< pii >
#define vi vector<ll ... | ALGO | 0.999835 | 4.058238 |
542bc99b-ecba-4721-b189-35bb9b875492 | shyam2520/DSA | 900-rle-iterator/900-rle-iterator.cpp | class RLEIterator {
int ptr;
vector<int> arr;
public:
RLEIterator(vector<int>& encoding) {
ptr=0;
arr=encoding;
}
int next(int n) {
if(ptr>=arr.size()) return -1;
if(arr[ptr]-n>0)
{
arr[ptr]-=n;
return arr[ptr+1];
}
... | ALGO | 0.999634 | 5.772781 |
7a4197c3-71ce-4096-af70-989385b5af88 | Lucas-Kido/HackerRank | C++/Semana 1/5. For Loop/main.cpp | #include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#inc... | ALGO | 0.999791 | 4.037591 |
ca4ddebd-4029-4eac-9e42-bcf5a1cd6b40 | ShriyasnhAgarwl/Leetcode-Submissions | 653-two-sum-iv-input-is-a-bst/653-two-sum-iv-input-is-a-bst.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999991 | 6.330278 |
8d6e8d01-ce6a-4100-8b2c-1dd22962e09b | majkimge/CompetitiveProgrammingCode | modernizacja/main.cpp | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define MAX 100009
#define INF 100000000009
#define MOD 1000696969
#define llu unsigned long long
#define lld long long
using namespace std;
int n,f,kk=1,co=1;
int tab[MAX];
int KMR[20][MAX];
pair<pair<int,int>,int> te... | ALGO | 0.999976 | 3.212485 |
ac98ac5a-79bb-40cb-a987-9856d58e5ad0 | jhn5052/BOJsolution | 11403.cpp | #include<iostream>
using namespace std;
//ġ (i,j) ΰ ִ
// ־.
//i° j° ڰ 1 쿡 i j
//0 . i° i° 0
class Graph {
int N; //
int G[101][101];//(i,j) or (i,m)(m,j)->߰ ļ j
public:
void setPoint() {
cin >> N;
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
cin >> G[i][j];
}
}
... | ALGO | 0.999942 | 3.819444 |
825584da-3c08-4403-9173-4603d4706615 | pacha2880/competitive_programming_codes | C. Sequence Transformation.cpp | #include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#define mp make_pair
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define sz(a) (int)a.size()
#define md(a, b) ((a) % b + b) % b
#define mod(a) md(a, MOD)
#define srt(a) sort(all(a))
#... | ALGO | 0.999939 | 4.211603 |
0f11f00c-c580-4684-9fe5-37a7ce809b98 | ravimenariya/LEETCODE_GFG_POTD | LEETCODE_POTD/Feb 2025/10-02-2025.cpp |
// problem -> https://leetcode.com/problems/clear-digits/
class Solution {
public:
string clearDigits(string s) {
stack<char>stk;
for(char&c:s)
{
if(48<=c && c<=57) stk.pop();
else stk.push(c);
}
string ans="";
while(!stk.empty())
... | ALGO | 0.999603 | 6.529556 |
7213f6bf-e425-4930-bcfb-e30474dcf90b | Peter2021-YZU/OPP-with-CPP | linked list Implementation/main.cpp | #include <iostream>
using namespace std;
struct Node
{
int data;
Node* link;
};
Node* head;
void traverseList( Node* );
void insertList( Node*, int );
Node* reverseList( Node* );
void recursivePrint( Node* );
void recReverse( Node* );
//void printList( Node* );
int main()
{
//Create linked list
// N... | ALGO | 0.999879 | 5.486516 |
996dc2de-9478-4d18-a701-bd63d4a761b2 | ishandutta2007/codeforces | ashishgup/normal/1421/B.cpp | #include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define int long long
const int N = 205;
int n;
char a[N][N];
void check(int x, int y, char ch)
{
if(a[x][y] == ch)
cout << x << " " << y << endl;
}
int32_t main()
{
IOS;
int t;
cin... | ALGO | 0.999895 | 3.754752 |
a6d0be2a-76cd-4f05-94ab-f3abc3f2d54f | jhpark0126/BOJ-Study | 11279.최대힙구현.cpp | #include <iostream>
using namespace std;
void swap(int *a, int *b)
{
int temp = *a;
*a = *b;
*b = temp;
}
int heap[100001];
int heapsize = 0;
void push(int n)
{
heap[++heapsize] = n;
for (int i = heapsize; i > 1; i /= 2)
{
if (heap[i] > heap[i / 2])
{
swap(heap[i], heap[i / 2]);
}
else
break;
}... | ALGO | 0.999997 | 4.608566 |
80079ca8-ac2e-4ca6-adbc-62920bb4f8ec | polilluminato/presentazione-flutter-jac-2023 | code/flutter_jac/windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.996679 | 6.785645 |
0acd3056-c143-46b9-86e0-38a7548702f5 | snjung/polpoBoard | Ressources/Software Original/arduinobase64/Base64.cpp | #include "Base64.h"
const char b64_alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789+/";
/* 'Private' declarations */
inline void a3_to_a4(unsigned char * a4, unsigned char * a3);
inline void a4_to_a3(unsigned char * a3, unsigned char * a4);
inline unsigned char b64_lookup(char c)... | ALGO | 0.962594 | 5.10668 |
1b47ccff-74d7-443c-8f86-bd9271c72e95 | pedro-filho-81/LivroDeC_mais_mais | Arrays/Histograma05.cpp | /*
Programa para criar histograma
*/
#include <iostream>
#include <clocale>
#include <cstdlib>
#include <iomanip>
using namespace std;
int main()
{
// muda a configurao para portugus brasileiro
setlocale(LC_ALL, "Portuguese");
// constante
const int TAmANHO = 10;
// vetor
int vetor[TAmAN... | ALGO | 0.935989 | 5.029262 |
13bc477d-b7fb-4fd9-839c-4c4d2b127f44 | Mixel2004/dsa | Max_rectangle.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
#define MAX 1000
// } Driver Code Ends
/*You are required to complete this method*/
class Solution{
public:
vector<int> nextSmall(int arr[], int n) {
vector<int> v(n);
stack<int> s;
s.push(-1);
for(int i = n-1; ... | ALGO | 0.9999 | 6.081903 |
0b396275-a0b8-4b6c-a75d-9a7708bcc931 | kingarthur11/leetcode | solution/2300-2399/2374.Node With Highest Edge Score/Solution.cpp | class Solution {
public:
int edgeScore(vector<int>& edges) {
int n = edges.size();
vector<long long> cnt(n);
for (int i = 0; i < n; ++i) {
cnt[edges[i]] += i;
}
int ans = 0;
for (int i = 0; i < n; ++i) {
if (cnt[ans] < cnt[i]) {
... | ALGO | 0.999939 | 5.486795 |
80f76779-603f-4f44-b587-6a3268d61213 | algasami/SummerProg2022 | club/shortpath.cpp | #include<bits/stdc++.h>
using namespace std;
typedef set<pair<char,int>> edge;
unordered_map<char, edge> graph;
unordered_map<char, pair<set<string>, int>> solutions;
char start;
void dfs(string currentPath, int weight, const char nextNode, const char destination)
{
if(currentPath.find(nextNode) != string::npos)
... | ALGO | 0.999768 | 4.079802 |
876214f5-72fa-4b82-a40c-20955a43654b | Nikhil-Mudgal/CF | 231A.cpp | #include <iostream>
#include <vector>
using namespace std;
int main(){
int t{0},counter{0},temp{0};
cin >> t;
for(int i{0};i<t ;i++){
int x{},y{},z{};
cin >> x ;
cin >> y;
cin >> z;
int arr[]{x,y,z};
for (auto i : arr){
if (i == 1){
... | ALGO | 0.999721 | 4.700881 |
34ba334e-9069-4896-837d-838ccb952335 | jones2126/ros1_lawn_tractor_ws | src/geonav_transform/matlab/geonav/ll2xy.cpp | /*==========================================================
* ll2xy.cpp for conversion to MEX file for MATLAB
*========================================================*/
#include "mex.h"
#include "../../include/geonav_transform/navsat_conversions.h"
/* Computational routine */
void ll2xy(double lat, double lon, dou... | TOOL | 0.953281 | 6.49704 |
6a01586d-c3a7-4417-bef5-aa9e2d2cfa28 | Lee-Duck-03/template_cp | codetumlumtala/dd.cpp | #include <stdio.h>
#include <algorithm>
#include <iostream>
#include <stack>
#include <vector>
using namespace std;
const int N = 100005;
const int oo = 0x3c3c3c3c;
void visit(int u) {
Low[u] = Num[u] = ++cnt;
st.push(u);
for (int v : a[u])
if (Num[v])
Low[u] = min(Low[u], Num[v]);
... | ALGO | 0.999681 | 4.578119 |
9911c0a5-289d-4380-9a31-997d449d6d67 | Zannatul-Naim/Competitive-Programming | Codeforces/Fair_numbers.cpp | #include<bits/stdc++.h>
#include<sstream>
using namespace std;
#define ll long long
#define endl "\n"
const int N = 2e5+1;
void fastIO() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
}
bool isFair(ll n) {
ll m = n;
while(m) {
int d = m%10;
if(d != 0 and n%d != 0) return false;
m /= 10;
}... | ALGO | 0.999255 | 4.921632 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.