uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
a4dfc5e4-9208-41a0-92ce-7e2d32f1db91 | MTG/essentia | src/algorithms/standard/constantq.cpp | #include "constantq.h"
#include "essentia.h"
#include <iostream>
using namespace std;
using namespace essentia;
using namespace standard;
const char* ConstantQ::name = "ConstantQ";
const char* ConstantQ::category = "Standard";
const char* ConstantQ::description = DOC("This algorithm computes Constant Q Transform usin... | ALGO | 0.999263 | 6.439169 |
9fe4515b-cfef-49cb-9b42-ec0cef688f22 | RashmivernekarN/C-Program | F7.CPP | /* prg to find factorial of a num using sub function*/
#include<iostream.h>
#include<conio.h>
int fact(int);
int main()
{
int f,n;
clrscr();
cout<<"Enter any num";
cin>>n;
f=fact(n);
cout<<"\n Factorial of a given num="<<f;
getch();
}
int fact(int x)
{
int i=1,f=1;
while(i<=x)
{
... | ALGO | 0.999905 | 3.653672 |
7cb7982f-014f-4413-a4f4-cfdac7248075 | ParhamBateni/LeetCodeDailyProblems | src/ReverseSubstringsBetweenEachPairOfParentheses_1190.cpp | /*
You are given a string s that consists of lower case English letters and brackets.
Reverse the strings in each pair of matching parentheses, starting from the innermost one.
Your result should not contain any brackets.
Example 1:
Input: s = "(abcd)"
Output: "dcba"
Example 2:
Input: s = "(u(love)i)"
Output: "il... | ALGO | 0.99812 | 6.913369 |
33a14dbf-4a4d-4e23-a013-2d2c554cc2f1 | system-pclub/GCatch | GCatch/tools/z3/src/solver/solver2tactic.cpp | #include "solver/solver.h"
#include "tactic/tactic.h"
#include "tactic/generic_model_converter.h"
#include "solver/solver2tactic.h"
#include "ast/ast_util.h"
typedef obj_map<expr, expr *> expr2expr_map;
void extract_clauses_and_dependencies(goal_ref const& g, expr_ref_vector& clauses, ptr_vector<expr>& assumptions, e... | ALGO | 0.997688 | 5.610079 |
081e4b89-6f7b-43bf-80ed-c2700b35e543 | maeth2/Leetcode | medium/add_two_numbers.cpp | #include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
using ll = long long;
struct ListNode {
int val;
ListNode *next;
ListNode() : val(0), next(nullptr) {}
ListNode(int x) : val(x), next(nullptr) {}
ListNode(int ... | ALGO | 0.999946 | 3.594123 |
c96cda3c-22ad-438c-8ff0-cae9d850f1d8 | kunal2812/CP | codeforces/1491/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
typedef vector<int> vi;
typedef vector<ll> vll;
typedef map<int,int> mii;
typedef map<char,int> mci;
typedef pair<int, int> pii;
typedef unordered_map<char, int> umci;
long long mod = 1000000007;
int main()... | ALGO | 0.999639 | 3.762657 |
0aacae2e-11d9-4745-9448-fb8f77190106 | Anmol2307/Codeforces | Round271Div2/B.cpp | #include <bits/stdc++.h>
using namespace std;
inline void inp(int &n ) {//fast input function
n=0;
int ch=getchar(),sign=1;
while( ch < '0' || ch > '9' ){if(ch=='-')sign=-1; ch=getchar();}
while( ch >= '0' && ch <= '9' )
n=(n<<3)+(n<<1)+ ch-'0', ch=getchar();
n=n*sign;
}
int main () {
i... | ALGO | 0.999922 | 3.619032 |
716dded7-a9a9-475e-9f94-793803e8cac0 | yaminsadik/leetcode | 13-Roman-to-Integer.cpp | class Solution {
public:
int romanToInt(string s) {
//create an unordered map
unordered_map<char, int> rToI{
{'I', 1},
{'V', 5},
{'X', 10},
{'L', 50},
{'C', 100},
{'D', 500},
{'M', 1000}
};
// varia... | ALGO | 0.999684 | 6.275847 |
70d21dc1-c06f-4aa4-a292-a486e7e5c9e5 | gean-dev/icpc-book | tests/modular-arithmetic/Combinatorics.cpp | #include "../../content/template/Header.hpp"
#include "../../content/modular-arithmetic/Combinatorics.hpp"
using namespace std;
const int N=1000;
mint C[N][N],P[N][N];
int main(int argc,char* argv[]){
for(int i=1;i<N;i++){
assert(i*invmod(i)==1);
}
mint val=1;
for(int i=0;i<N;i++){
a... | TEST | 0.860968 | 4.421144 |
ad870386-bc25-4cb3-a5e3-acd036267d3c | alemam242/CodeAbbey_solution | 3.cpp | #include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int a[n], b[n], sum[n];
for (int i = 0; i < n; i++)
{
cin >> a[i] >> b[i];
sum[i] = a[i] + b[i];
}
for (int i = 0; i < n; i++)
{
cout << sum[i] << endl;
}
return 0;
} | ALGO | 0.999611 | 3.760813 |
264fa9f3-cbde-4a60-94a6-19fd45e19a59 | ABMLab/openbeacon-mn | host/openbeacon-power/src/crypto.cpp | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include "crypto.h"
#define SubBytes(i) state[i] = g_sbox[state[i]]
#define AddRoundKey(i) state[i] ^= key[i]
#define MixColumn(i) \
t[0] = state[i]; \
t[1] = state[i + 1]; \
t[2] = state[i + 2]; \
t[3] = state[i + 3]; \
x = t[0] ^ t[... | ALGO | 0.998392 | 6.51545 |
3b7c7f33-6a89-4886-a8e3-e23fc2f4b4e8 | xela6134/leetcode | 20/valid_parentheses.cpp | #include <string>
#include <iostream>
#include <stack>
auto isValid(std::string s) -> bool {
std::stack<char> brackets;
for (char& ch : s) {
if (ch == '(') {
brackets.push(ch);
} else if (ch == ')') {
if (not brackets.empty() and brackets.top() == '(') {
... | ALGO | 0.996566 | 6.673333 |
85cdabeb-5dad-4a03-bdf8-bd6005d7acb0 | kamyu104/LeetCode-Solutions | C++/construct-product-matrix.cpp | // Time: O(m * n)
// Space: O(m * n)
// prefix sum
class Solution {
public:
vector<vector<int>> constructProductMatrix(vector<vector<int>>& grid) {
static const int MOD = 12345;
vector<int64_t> right(size(grid) * size(grid[0]) + 1, 1);
for (int i = size(grid) - 1; i >= 0; --i) {
... | ALGO | 0.999991 | 6.9454 |
e1d66257-1723-4e97-9bfa-13dc290fb7d1 | al-martyn1/tvision_from_sf | examples/listvi/listbox2.cpp | // ***********************************************************************
//
// LISTBOX1.CPP Test Program
// TListViewer Example - Scrolling Lists
// revised November 27,1993
// C.Porter 70262,1047
// ***********************************************************************
#include <stdlib.h>
#define Uses_TApplica... | TOOL | 0.856103 | 5.285242 |
ef9b968c-5f84-47c4-b9d9-e7858c095c2a | blackbeardONE/CheggHero | coursehero_auto_reg/txtsource/269b.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
#define fill(a,x) memset(a,x,sizeof(a))
#define pb push_back
#define sz(x) (int)x.size()
#define F first
#define S second
#define FOR(i,a,b) for(int i = a; i<=b; ++i)
#define NFOR(i,a,b) for(int i =... | ALGO | 0.99997 | 3.401228 |
4bc484d3-b859-4dcf-b8b6-2de3ecb6d860 | sking8484/skyline_IntroCPP | Mod7/fractionCalculator/fractionCalculator/main.cpp | #include <iostream>
using namespace std;
void addFractions(int num1, int denom1, int num2, int denom2,int array[]);
void subtractFractions(int num1, int denom1, int num2, int denom2, int array[]);
void multiplyFractions(int num1, int denom1, int num2, int denom2, int array[]);
void divideFractions(int num1, int denom1... | TOOL | 0.930852 | 4.562232 |
8075bf78-06a5-4d48-914c-fd4d5f2cb02d | NAgrawal1798/Competitive-coding | 1-two-sum/two-sum.cpp | class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
map<int, int>mp;
for (int i=0; i<nums.size(); i++) {
if (mp.find(target - nums[i]) != mp.end()) {
return {i, mp[target - nums[i]]};
}
mp[nums[i]] = i;
}
r... | ALGO | 0.99947 | 6.327039 |
09ff8fad-ca19-4885-a98a-06ac88fae8e7 | sxnxl/senol | code/game/simple/tank/tank.cpp | #include <iostream>
#include <cmath>
typedef int point_t;
class Area
{
public:
//Area();
//Area(size_t,size_t);
//~Area();
size_t getX (void)
{
return x;
};
size_t getY (void)
{
return y;
};
void setX (size_t n)
{
x = n;
};
void setY (size_t n)
{
y = n;
};
size_t getW... | ALGO | 0.997391 | 5.184322 |
3128a200-d028-4b67-8920-5bc3beb1c36b | PunnyOz2/POSN-Programming | April/TechnologyTOI14.cpp | /*
TASK:
LANG: CPP
AUTHOR: PeaTT~
SCHOOL: CRU
*/
#include<bits/stdc++.h>
using namespace std;
vector<int> g[100100];
int in[100100];
int in2[100100];
queue<int> dfs;
struct A{
int u,Min;
bool operator<(const A&o)const{
return Min>o.Min;
}
};
priority_queue<A> dfs2;
int mark[100100];
... | ALGO | 0.999957 | 3.596374 |
aa49f1ef-3734-4e25-80b7-e5538872c841 | swaralichine/Leetcode-Solutions | 2149-rearrange-array-elements-by-sign/2149-rearrange-array-elements-by-sign.cpp | //Time Complexity=O(n)
//Space Complexity=O(1)
class Solution
{
public:
vector<int> rearrangeArray(vector<int>& nums)
{
vector<int> ans(nums.size());
//declaring the two pointers
int i=0;
int j=1;
for(int k=0;k<nums.size();k++)
{
if(n... | ALGO | 0.999955 | 5.4966 |
6e2f4fc5-f77b-4d44-abca-a9440be18444 | ganeshpaib/CollegePrograms | EXTRAS/sem3/ada/LIST.CPP | #include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<string.h>
#include<iostream.h>
class list
{
list *link;
int no,salary;
char name[20];
public:
list(){no=0;link=NULL;}
void addend();
void addbeg();
void sortbyno();
void sortbyname();
void reverse();
void disp();
};
list *ptr=NULL;
void ... | ALGO | 0.998135 | 3.483848 |
c99c418a-5bda-4c4f-8d97-4c684d022484 | GeniusFKT/CPP-LeetCode | yc/62_不同路径.cpp | class Solution {
public:
int uniquePaths(int m, int n) {
int *dp = new int [n];
int i;
for (i = 0; i < n; ++i)
dp[i] = 1;
for (int _ = 1; _ < m; ++_)
for (int i = 1; i < n; ++i)
dp[i] += dp[i-1];
return dp[n-1];
}
}; | ALGO | 0.999575 | 6.331015 |
47e59587-94d4-4748-a9eb-de656bad9c41 | trungkiengrxer/C-- | Code PTIT/CPP0225.cpp | #include <algorithm>
#include <iostream>
#include <vector>
int main() {
int t;
std::cin >> t;
while (t--) {
int n;
std::cin >> n;
std::vector<std::vector<int>> a(n, std::vector<int>(n));
std::vector<int> rowSum(n);
std::vector<int> colSum(n);
for (int i = 0; ... | ALGO | 0.999968 | 5.778317 |
7008de55-ef75-49ed-ae31-dae12013a762 | TobiasFaller/FreiTest | libraries/solver/max-sat-pacose/maxpre2/src/cardinalityconstraint.cpp | #include <vector>
#include <cassert>
#include <iostream>
#include <map>
#define F first
#define S second
#include "cardinalityconstraint.hpp"
using namespace std;
namespace maxPreprocessor {
CardinalityConstraint::CardinalityConstraint(int type_, int coding_, const vector<int>& inputLiterals_, const vector<int>& out... | ALGO | 0.999875 | 4.644333 |
0a581681-d789-4b8d-9dd4-ba385f81cf2a | Hengle/misc_microsoft_gamedev_source_code | misc_microsoft_gamedev_source_code/misc_microsoft_gamedev_source_code/extlib/wwise/source/SoundEngine/Plugins/Motion/Devices/D-BOX/Win32/filter.cpp | #include "stdafx.h"
#include "filter.h"
#include <memory.h>
#include <malloc.h>
#include <math.h>
CIIRFilter::CIIRFilter()
{
Reset();
}
CIIRFilter::~CIIRFilter()
{
}
void CIIRFilter::Reset()
{
for(int i = 0; i < 8; i++)
memX[i] = 0.0;
for(int i = 0; i < 12; i++)
memY[i] = 0.0;
}
void CIIRFilter::Execute(flo... | ALGO | 0.989191 | 4.545675 |
834abd81-e013-445a-9aab-291af2ba2dc4 | Kseniya-Mi/Operation_System | synchronization_threads/synchronization_threads.cpp | #include <Windows.h>
#include <iostream>
int array_size = 0;
int* arr = nullptr;
CRITICAL_SECTION cs;
HANDLE* hThreads;
HANDLE* hThreadsStartEvents;
HANDLE* hThreadWorkStopped;
HANDLE* hThreadsExit;
HANDLE hMutex;
DWORD WINAPI marker(LPVOID thread_index) {
WaitForSingleObject(hThreadsStartEvents[(int)thread_index], ... | ALGO | 0.990193 | 3.416844 |
f65e2fa9-d099-4607-b999-8e9b92d217c5 | artium59/algo_study | BOJ/02000~/2094.cpp | #include <cstdio>
#include <algorithm>
int n, m, x, y, z, xloc, yloc, cnt, year[50005], rain[50005];
bool swch;
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%d %d", year+i, rain+i);
scanf("%d", &m);
while (m--) {
scanf("%d %d", &y, &x);
swch = true; cnt = ... | ALGO | 0.999985 | 4.720438 |
fd93a02a-a20e-45e3-b587-516c61dc8c58 | anubhuti24/Hackerrank-codes | C++/Simple_Array_Sum.cpp | #include<iostream>
using namespace std;
int simpleArraySum(int a[],int size)
{
int b=0;
for(int i=0;i<size;i++)
{
b=b+a[i];
}
return b;
}
int main()
{
int size;
cin>>size;
int arr[size];
for(int i=0;i<size;i++)
{
cin>>arr[i];
}
int sum=simpleArraySum(arr,... | ALGO | 0.998836 | 3.95328 |
ca179e56-8ba0-4aac-98e0-3f16d4d1edc9 | tianyiran02/udacity_SensorFusionLidarProject | src/environment.cpp | /* \author Aaron Brown */
// Create simple 3d highway enviroment using PCL
// for exploring self-driving car sensors
#include "sensors/lidar.h"
#include "render/render.h"
#include "processPointClouds.h"
// using templates for processPointClouds so also include .cpp to help linker
#include "processPointClouds.cpp"
std... | TOOL | 0.890298 | 4.568827 |
05a7252f-8be8-4c94-b255-330948d4c21e | Gtupxx/ccpp | MIDI/PlayerClass.cpp | /*
* @Author: 柚岩龙蜥
* @Date: 2023-12-05 21:46:17
* @LastEditors: 柚岩龙蜥
* @LastEditTime: 2023-12-14 12:09:07
* @FilePath: \ccpp\MIDI\PlayerClass.cpp
* @Description:
*
*/
#include <iostream>
#include <fstream>
#include <Windows.h>
#include <mmsystem.h>
#include <mutex>
#include <unordered_map>
#include <vector>
#in... | TOOL | 0.875073 | 3.586285 |
fe5a6e03-b45f-4b29-aedd-530b17adc18f | Kshitij83/leetcode-solutions | 0215-kth-largest-element-in-an-array/0215-kth-largest-element-in-an-array.cpp | class Solution {
public:
int findKthLargest(vector<int>& nums, int k) {
priority_queue<int,vector<int>,greater<int>> pq;
for(int i=0;i<k;i++) pq.push(nums[i]);
for(int i=k;i<nums.size();i++) {
if(nums[i]>pq.top()) {
pq.pop();
pq.push(nums[i]);
... | ALGO | 0.999906 | 5.204583 |
584c6110-0b09-4bf3-9bd6-42eac4285a75 | samssjubair/dsa-practice | backtrack/leetcode22/generateParenthesis.cpp | #include<iostream>
#include<vector>
using namespace std;
void backtrack(vector<string>&ans,int n, int open, int close, string current_string){
if(open==n&&close== n){
ans.push_back(current_string);
return;
}
if(open<n){
backtrack(ans, n, open+1,close,current_string+"(");
}
i... | ALGO | 0.99953 | 5.046058 |
769241d1-5550-45fb-a6ce-c5d931856c8c | MelvinLie/roxie_evaluator | cpp/c-algorithms/MLFMM/MagneticFluxDensityMonitor.cpp | #include "MagneticFluxDensityMonitor.hpp"
//constructors
MagneticFluxDensityMonitor::MagneticFluxDensityMonitor(){};
int MagneticFluxDensityMonitor::get_output_space_dimension(){
return output_space_dimension_;
}
void MagneticFluxDensityMonitor::computeMoments(Eigen::MatrixXcd *moments,
... | ALGO | 0.997524 | 5.579095 |
9adf4d1c-1985-4971-9462-478066642cf1 | ailanxier/Refine_Protobuf_Mutator | proto_seed/create_proto_input.cpp | #include "postprocess/postprocess.h"
#include "proto/proto_setting.h"
#include "mutation_test/include/util.h"
using namespace std;
using namespace google::protobuf;
using namespace protobuf_mutator;
#define SEED_NUM 10
char temp[MAX_BINARY_INPUT_SIZE + 2];
int main(int argc, char *argv[]){
auto read_file_from_pat... | DATA | 0.928348 | 4.727534 |
7ce003a9-e779-4ff4-853d-1e7f5ff1bd4f | kaidenjoonko/hw5 | wordle.cpp | #ifndef RECCHECK
// For debugging
#include <iostream>
// For std::remove
#include <algorithm>
#include <map>
#include <set>
#endif
#include "wordle.h"
#include "dict-eng.h"
using namespace std;
// Add prototypes of helper functions here
void finder(string temp, const std::string& in, const std::string& floating, con... | ALGO | 0.975875 | 5.49085 |
945edfbe-b8ee-49af-baf9-743c07c2bd23 | shubpl7/CrackingTheCode | aug27a.cpp | #include<bits/stdc++.h>
#define int long long
using namespace std;
int mask1=0,mask2=0,mask3=0;
int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
#endif
int t;
cin>>t;
whil... | ALGO | 0.998703 | 3.522545 |
2329171e-5c4c-4b96-a98e-3997107f62b7 | SuryaPratapSinghRana/DSA | greedy/striverGreedy/medium_hard/q3_jump_game_2.cpp | class Solution {
public:
int jump(vector<int>& nums) {
int n=nums.size();
int jumps = 0;
int l=0;
int r=0;
while(r<n-1)
{
int farthest=0;
for(int ind=l ;ind<=r;ind++)
{
farthest =max(farthest,ind+nums[ind]);
}
l=r+1;
... | ALGO | 0.999993 | 6.045074 |
4b03e955-26fc-4c6b-af80-899327db9c39 | danishkangwal/LeetCode | 0901-online-stock-span/0901-online-stock-span.cpp | class StockSpanner {
stack<pair<int, int>> storage;
int index = 0;
public:
StockSpanner() {
}
int next(int price) {
if (storage.empty()) {
storage.push({price, index++});
return 1;
} else {
while (!storage.empty() && price >= storage.... | ALGO | 0.999226 | 6.331852 |
38f78354-a14d-4cbf-8e5f-a1d97e8a215a | abdalla-am/codeforces-solutions | 116A.cpp | #include<iostream>
#include<string>
using namespace std;
int main() {
int noOfStops;
int noOfEntries[1000] = {}, noOfExits[1000] = {};
int tempEntry;
int tempExit;
int capacity = 0;
int cap = 0;
cin >> noOfStops;
int temp2entry;
for (int i = 0; i < noOfStops; i++)
{
cin >> tempExit >> tempEntry;
if (i ... | ALGO | 0.999655 | 3.787792 |
9e1ed803-eb9c-49b8-90c4-19c97e700582 | cutieseul/Flutter_learning | Stateless/alert_dialog_app/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.998128 | 6.783439 |
a890744e-e2ad-41df-8db2-e6f76b97f908 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_7189_1.cpp | #include <iostream>
using namespace std;
int a, b, c;
int main() {
cin>>a>>b>>c;
if(a<b && b<c)cout<<"Yes"<<endl;
else )cout<<"No"<<endl;
return 0;
}
| ALGO | 0.999974 | 3.896033 |
1334aab5-0f30-4381-9f5d-8b72ea321fe3 | yanfi21/REPITTOP | DZ05114.cpp | #include <iostream>
#include <vector>
bool isPrime(int number) {
if (number < 2) return false;
for (int i = 2; i * i <= number; ++i) {
return false;
}
}
return true;
int main() {
std::cout << "Простые числа в диапазоне от 2 до 1000:" << std::endl;
for (int num = 2;... | ALGO | 0.997129 | 5.021657 |
889b0cd7-3402-410b-a7f8-9fc7f5b8f1b9 | GAINS-ASEN23/Ground-Software | boost/libs/compute/example/inline_ptx.cpp | #include <algorithm>
#include <iostream>
#include <vector>
#include <boost/compute/system.hpp>
#include <boost/compute/algorithm/copy.hpp>
#include <boost/compute/algorithm/transform.hpp>
#include <boost/compute/container/vector.hpp>
namespace compute = boost::compute;
// this example shows how to embed PTX assembly... | ALGO | 0.985386 | 7.40696 |
d35f7992-2e3e-4e47-86b1-9fa984b6b8d0 | ishandutta2007/codeforces | derekfeng/normal/47/C.cpp | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <queue>
#include <sstream>
#include <stack>
#include <time.h>
#include <vector>
#include <complex>
#include <map>
#include <set>
#include <iomanip>
#include <ma... | ALGO | 0.999559 | 3.083961 |
066a4e7a-de07-489d-b151-fed744c361bf | YugalRajVimal/45Days-DSA-Challenge | 2-Recursion_and_Backtracking/18-Permutations.cpp | class Solution {
public:
void helper(vector<vector<int>> &ans,vector<int>& nums,int index){
if(index==nums.size()){
ans.push_back(nums);
return;
}
for(int i=index;i<nums.size();i++){
swap(nums[i],nums[index]);
helper(ans,nums,index+1)... | ALGO | 0.999997 | 6.308712 |
48ecd682-85fb-4a67-a778-9fd9d382ee73 | toha993/Codeforces-My-Code | 1186D.cpp | #include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<algorithm>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
#include <iom... | ALGO | 0.999878 | 3.478696 |
12511dbc-745f-49ee-bff9-5de4d850bbb5 | CompTop/BATS | demo/witness_filtration.cpp | #include <bats.h>
#include <util/io.h>
#include <string>
#define FT ModP<int, 3>
#define VT SparseVector<FT>
#define MT ColumnMatrix<VT>
int main (int argc, char* argv[]) {
size_t d = 2; // dimension of Euclidean Space
size_t n = 100;
// maximum simplex dimension
size_t maxdim = parse_argv(argc, argv, "-maxd... | TEST | 0.923095 | 6.137152 |
a527be26-543d-41be-93c7-97b34606c3b2 | ibizzn/audacity | src/effects/EBUR128.cpp | /**********************************************************************
Audacity: A Digital Audio Editor
EBUR128.cpp
Max Maisel
***********************************************************************/
#include "EBUR128.h"
EBUR128::EBUR128(double rate, size_t channels)
: mChannelCount(channels)
, mRate(rate)... | TOOL | 0.971795 | 6.566171 |
63914538-8bb3-4b07-a3fe-dae886e06192 | dmehrab06/Time_wasters | codechef/june long.cpp/june2.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int t;
scanf("%d",&t);
for(int i=1;i<=t;++i){
int a;
scanf("%d",&a);
if(a%6==0){
printf("Misha\n");
}
else{
printf("Chef\n");
}
}
return 0;
}
| ALGO | 0.99993 | 3.711415 |
c2ddb3c7-a711-409d-8657-930780b69c4d | tractatus/microLRM | src/clusters.cpp | #include "clusters.hpp"
Clusters::Clusters(std::vector<std::vector<int>> ampliconSignal,
std::vector<std::vector<int>> ampliconNoise,
int correction_cycle, ///< Build crosstalk correction based on this cycle
int iteration_threshold, ///... | ALGO | 0.998476 | 3.791928 |
ae6dbe49-0d89-4414-8d2a-3740bbabe5ed | saipraneeth1009/Leetcode-problems | 0205-isomorphic-strings/0205-isomorphic-strings.cpp | class Solution {
public:
bool isIsomorphic(string s, string t) {
vector<int> ls(256,0);
vector<int> ts(256,0);
for(int i=0;i<s.size();i++){
if(ls[s[i]]!=ts[t[i]]) return false;
ls[s[i]]=i+1;
ts[t[i]]=i+1;
}
return true;
}
}; | ALGO | 0.999987 | 6.330398 |
78c28821-368e-4530-a420-14d2f3c41c91 | plasmatic1/dmoj-solutions | cpp/coci09c1p4.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// Scan and Debug
void scan(){}
template<typename F, typename... R> void scan(F &f,R&... r){cin>>f;scan(r...);}
int di_; string dnms_, co_ = ",";
void debug_(){cout<<endl;}
template<typename F, typename... R> void debug_(F f, R... r){while(dnms_[di_... | ALGO | 0.99988 | 4.070817 |
921a665f-8d0a-43b0-a4fc-b49610176c55 | snaprick/PP1_20BD | Lab/Lab6/L.cpp | #include <bits/stdc++.h>
using namespace std;
string s;
int n,cnt,mx;
int main()
{
cin >> s >> n;
for(int i=0;i<s.size();i++)
{
if(s[i]>='0' && s[i]<='9')
{
cnt++;
}
else
{
if(cnt>mx)
{
mx=cnt;
}
... | ALGO | 0.999262 | 4.484194 |
9e583bf1-835e-4a45-aa05-f011207d1980 | potato77/uav_simulator | src/local_sensing/src/euroc.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <ros/ros.h>
#include <message_filters/subscriber.h>
#include <message_filters/synchronizer.h>
#include <message_filters/sync_policies/exact_time.h>
#include <message_filters/sync_policies/approximate_time.h>
#include <geometry_msgs/PoseStamped.h>
#inclu... | DATA | 0.864571 | 4.397314 |
4ca293d9-df4c-4e16-b232-dd1ec98435c5 | JubyJoseph2020/ADS | CIRCU.CPP | #include<iostream.h>
#include<conio.h>
#include<stdlib.h>
# define size 5
int q[size],front=0,rear=0;
void main()
{
int ch,i;
clrscr();
void enq();
void deq();
void display();
while(i)
{
cout<<"\n1.add element";
cout<<"\n2.remove element";
cout<<"\n3.display";
cout<<"\nexit";
cin>>ch;
switch(ch)
{
case 1:enq();
break;
... | ALGO | 0.997575 | 3.309802 |
57a9bf84-bc8f-4fc2-bf11-0adf5b2bb395 | infinitensor-cwr/learning-cxx | exercises/05_constexpr/main.cpp | #include "../exercise.h"
constexpr unsigned long long fibonacci(int i) {
switch (i) {
case 0:
return 0;
case 1:
return 1;
default:
return fibonacci(i - 1) + fibonacci(i - 2);
}
}
int main(int argc, char **argv) {
constexpr auto FIB20 = fibonacci(... | ALGO | 0.994743 | 5.006701 |
67579329-6a73-499e-9b5a-2f9ee4b365ce | SuperRoboticsNerds/navigation | wall_follower/src/wall_follower.cpp | #include "ros/ros.h"
#include "std_msgs/String.h"
#include "std_msgs/Float64.h"
#include "ras_arduino_msgs/PWM.h"
#include "ras_arduino_msgs/Encoders.h"
#include "ras_arduino_msgs/ADConverter.h"
#include "geometry_msgs/Twist.h"
#include "localization/Distance_message.h"
#include <sstream>
#include <math.h>
#include <cm... | TOOL | 0.919994 | 4.504827 |
ad2314b1-a8d4-43a0-a164-84fba13681b2 | ishandutta2007/codeforces | tlewpdus/normal/1305/F.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll MOD = 998244353;
int n;
ll arr[200100];
const int MAX = 1000100;
bool sve[MAX+10];
int p;
ll pri[100100];
void init() ... | ALGO | 0.999962 | 3.872202 |
f0f8e56f-7a37-4a9f-8fbc-b7cbf49f6038 | Anup0099/450DSA_Question | src/linkedListCpp/targetSum.cpp | #include <bits/stdc++.h>
using namespace std;
// memoization
long f(int ind, int T, int *a, vector<vector<long>> &dp)
{
if (ind == 0)
{
return (T % a[0] == 0);
}
if (dp[ind][T] != 0)
{
return dp[ind][T];
}
long notTake = f(ind - 1, T, a, dp);
long take = 0;
if (T >= ... | ALGO | 0.999887 | 4.586032 |
f76a249b-b157-4887-ab82-5e19354a648f | Umar1Shafi/Decode-DSA-with-C-Assingments | 11-Assingment-4/11-Assingment-4-Q5.cpp | #include <iostream>
#include <string>
#include <stack>
using namespace std;
string decimalToBinary(int n) {
if (n == 0) {
return "0";
}
if (n == 1) {
return "1";
}
return decimalToBinary(n / 2) + to_string(n % 2);
}
int main() {
int n = 10;
cout << "Binary representation of... | ALGO | 0.99964 | 6.983389 |
04a80c37-b282-4483-b4bb-dc11f7cd982e | glob3mobile/g3m | cpp/G3M/Frustum.cpp | //
// Frustum.cpp
// G3M
//
// Created by Agustin Trujillo Pino on 15/07/12.
//
#include "Frustum.hpp"
#include "Box.hpp"
#include "BoundingVolume.hpp"
#include "FrustumData.hpp"
Frustum::Frustum(const FrustumData* data):
_ltn(Vector3D(data->_left, data->_top, -data->_zNear)),
_rtn(Vector3D(data->_right, data-... | TOOL | 0.884314 | 6.437484 |
a9daba19-9a4f-4419-8c94-418bddd55235 | SharonJN/Data-Structures-and-Algorithim | another for loop.cpp | #include<iostream>
using namespace std;
int main(){
int n;
for(n=10; n>=1; n--){
cout<<n<<" ";
}
}
| ALGO | 0.995105 | 3.179202 |
ddd43985-db28-44bc-88bc-2c910d890e36 | SeongHo5356/Data_Structure | Binary_Search/Binary_Search/Binary_Search.cpp | #include <iostream>
using namespace std;
int BinarySearch(int arry[], int sizeOfArray, int value) {
int midPoint;
int first = 0;
int last = sizeOfArray - 1;
bool moreToSearch = (first <= last);
while (moreToSearch == true) {
midPoint = (first + last) / 2;
if (value > arry[midPoint]) {
first = midPoint ... | ALGO | 0.999985 | 4.715786 |
4eb90793-0872-40f7-beaf-1a88f9751933 | BuRNedS/LeetCode-GFG-Problems | GFG/07.05.25.cpp | class Solution {
public:
void dfs(Node* root, vector<vector<int>>& ans, vector<int>& path){
if(!root->left && !root->right){
path.push_back(root->data);
ans.push_back(path);
path.pop_back();
return;
}
path.push_back(root->data);
if(ro... | ALGO | 0.999963 | 6.170149 |
677677ca-a44a-41bb-bff5-3ae647b7eaf4 | elhamAm/faceMorphing | libigl/include/igl/embree/bone_heat.cpp | bool igl::embree::bone_heat(
const Eigen::MatrixXd & V,
const Eigen::MatrixXi & F,
const Eigen::MatrixXd & C,
const Eigen::VectorXi & P,
const Eigen::MatrixXi & BE,
const Eigen::MatrixXi & CE,
Eigen::MatrixXd & W)
{
using namespace std;
using namespace Eigen;
assert(CE.rows() == 0 && "Cage edges not... | ALGO | 0.985628 | 5.694891 |
caac43e8-74c3-4b3b-9378-40338fc07d4e | oger2004/BackTracking | main.cpp | // Roger Costa Maubens
// u1987277
// p2
#include <iostream>
#include<list>
#include <chrono>
#include <fstream>
#include "Candidats.h"
#include "Solucionador.h"
#include "Solucio.h"
using namespace std;
void mostrarAjuda ( char * nomPrograma );
/**<
* @brief mostra totes les opcions del programa
* ... | TOOL | 0.893932 | 3.870156 |
0883f77f-a5b8-4f50-b3ed-7df03362aed7 | rodrigues-1917/POO-Exercicios | ex_19_lista_2_(Maior numero, template)/main.cpp | #include <iostream>
using namespace std;
template <typename T>
T Maior(T num1, T num2)
{
return ((num1 > num2)? num1 : num2);
}
int main()
{
cout << Maior(12.5, 126) << endl;
return 0;
}
// O erro acontece na linha 13, pois a sintaxe no est correta.
// Tendo dois numeros de tipo diferen... | ALGO | 0.992128 | 4.149157 |
74c36a25-c742-4ec4-94fb-a4e503f76c9f | HARSH-MADHAVAN/DSA-in-Cpp | 1_basics of c++/5_nested_if_else.cpp | #include<iostream>
using namespace std;
int main(){
int n;
cout<<"enter a number:"<<endl;
cin>>n;
if(n>0){
cout<<"The number is positive";
}
else{
if(n<0){
cout<<"The number is negative";
}
else{
cout<<"The number is equal to 0";
... | ALGO | 0.997269 | 3.14323 |
88942bed-75e9-4927-817a-46c2b68e67bb | gwangholee507/algorithm | cpp/gold/4/12851.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <stack>
using namespace std;
int N, K, CNT = 999999, num = 0;
bool flag = false;
bool visited[100001] = { false };
void dfs(int n, int k) {
queue<... | ALGO | 0.999726 | 4.324719 |
55a0b0f7-a8df-4839-91cf-3e8e75031790 | TDLoi123/code-basic | sinhtohop.cpp | #include<bits/stdc++.h>
using namespace std;
int n, k, a[1005];
void Sinh(){
for (int i=0; i<k; i++) a[i] = i+1;
int i=k-1;
int check = 1;
while(check){
for (int i=0; i<k; i++){
cout << a[i] << " ";
}
cout << endl;
while (i>=0 && a[i]==n-k+i+1){
i--;
}
if (i>=0){
a[i]++;
for (int j=i+1; j<=... | ALGO | 0.999952 | 3.449603 |
00643fe7-d684-43ce-a175-0eae08eba646 | coutar-a/TP3_algo | src/graphe.cpp | //
// Graphe.cpp
// Classe pour graphes orientés pondérés (non négativement) avec listes d'adjacence
//
// Mario Marchand automne 2016.
//
#include "graphe.h"
using namespace std;
//! \brief Constructeur avec paramètre du nombre de sommets désiré
//! \param[in] p_nbSommets indique le nombre de sommets désiré
//! ... | ALGO | 0.995112 | 3.498114 |
4ffee5cc-4ec6-4c23-a952-9d28651da05d | godspeed1989/opencv_samples | Face_Det_Haar/traincascade/features.cpp | #include "opencv2/core/core.hpp"
#include "opencv2/core/internal.hpp"
#include "traincascade_features.h"
#include "cascadeclassifier.h"
using namespace std;
float calcNormFactor( const Mat& sum, const Mat& sqSum )
{
CV_DbgAssert( sum.cols > 3 && sqSum.rows > 3 );
Rect normrect( 1, 1, sum.cols - 3, sum.rows -... | ALGO | 0.852251 | 6.46874 |
b1994e6b-6e75-486b-826a-47a67b713fc4 | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_train_10942_2.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
long long s, a, b, c;
cin >> s >> a >> b >> c;
long long f = s / (a * c);
long long ans = (f * (a + b)) + ((s - (f * a * c)) / c);
cout << ans << '\n';
}
return 0;
}
| ALGO | 0.999446 | 3.475561 |
079938c5-3f47-4301-b689-9a19e83ab46f | a00012025/Online_Judge_Code | HSNU-OJ/263.cpp | #include<bits/stdc++.h>
using namespace std;
const int maxn=150000+10 ;
struct P
{
int pos,id,num,right ;
bool operator < (const P &rhs) const
{
return pos!=rhs.pos ? pos<rhs.pos : id<rhs.id ;
}
};
bool cmp(const P &a,const P &b)
{
if(a.pos!=b.pos) return a.pos<b.pos ;
else return a.id<... | ALGO | 0.999954 | 3.510393 |
86d7b09e-0b78-4fc0-b64f-b90dce15e694 | Tanyamodi/Practice-Questions | Recursion/11_reverse.cpp | #include<iostream>
#include<string>
using namespace std;
void reverse(string &str, int start, int end){
if(start>=end){
return;
}
swap(str[start], str[end]);
reverse(str, start+1, end-1);
}
int main(){
string str;
cin>>str;
reverse(str, 0, str.size()-1);
cout... | ALGO | 0.999886 | 5.61416 |
c4c96c48-4f24-406b-ac72-add1dbc32636 | begoon/acm | uva.onlinejudge.org/11725, Colorful Board/problem.cpp | #include <iostream>
#include <vector>
#include <map>
#include <stack>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <iterator>
#include <numeric>
#include <limits>
#include <algorithm>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cassert>
#ifdef _DEBUG
#include <... | ALGO | 0.99989 | 4.217137 |
bed4503d-7bca-4975-b3fa-3565c3d3c127 | WenShihKen/uva | Zerojudge/b923 stack 堆疊的模板題.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.999632 | 4.178994 |
de6b5d29-3422-4d22-b562-21dc95842d4d | ishandutta2007/codeforces | brobat/normal/1556/C.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define forn(i, a, n) for (int i = a; i < n; i++)
#define MAXN 200100
#define MOD 1000000007
void solve() {
int n;
cin >> n;
int arr[n];
forn(i, 0, n) {
cin >> arr[i];
if(i%2==1) arr[i] *= -1;
}
int ans = 0;
... | ALGO | 0.999991 | 4.05404 |
9720f148-d398-4476-9a81-d77917add175 | csienslab/icLibFuzzer | libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct.pass.cpp | // UNSUPPORTED: c++03, c++11, c++14
// <memory>
// template <class ForwardIt>
// void uninitialized_value_construct(ForwardIt, ForwardIt);
#include <memory>
#include <cstdlib>
#include <cassert>
#include "test_macros.h"
#include "test_iterators.h"
struct Counted {
static int count;
static int constructed;
st... | TEST | 0.852261 | 7.152513 |
79f3e9f2-620a-49dd-88c8-7af3d9699f11 | goldi1027/GT-EHL | boost_1_64_0/libs/graph/test/mean_geodesic.cpp | #include <iostream>
#include <boost/graph/undirected_graph.hpp>
#include <boost/graph/directed_graph.hpp>
#include <boost/graph/exterior_property.hpp>
#include <boost/graph/property_maps/constant_property_map.hpp>
#include <boost/graph/floyd_warshall_shortest.hpp>
#include <boost/graph/geodesic_distance.hpp>
using n... | TEST | 0.99648 | 5.285728 |
fdd1ffb9-69a0-46af-9eec-ab053457209c | star-platinum127/uva | cf 1443 A.cpp | #include <bits/stdc++.h>
using namespace std;
typedef int64_t ll;
#define miku mywaifu
#define misaka mywaifu
#define pb push_back
#define S second
#define F first
#define mem(i,j) memset(i,j,sizeof(i))
#define pii pair<int,int>
#define pll pair<long,long>
#define lowbit(x) x&-x
const int MOD = 1000000009;
const int MA... | ALGO | 0.999501 | 3.638941 |
dc33b868-c11c-4884-949b-cf7a8e8446d5 | rbtre/rbtre.github.io | assets/code/P1644.cpp | #include <iostream>
using namespace std;
int dr[][2] = {1, 2, 2, 1, -2, 1, -1, 2};
int m, n, cnt;
void dfs(int x, int y) {
if (x < 0 || x > n || y > m)
return;
if (x == n && y == m) {
cnt++;
return;
}
for (auto& i : dr)
dfs(x + i[0], y + i[1]);
}
int main() {
cin >> n >> m;
dfs(0, 0);
... | ALGO | 0.99987 | 3.745029 |
bebbeaa1-1c9d-4531-ba29-f57466ef4ecb | quake0day/oj | Reverse Words in a String.cpp | class Solution {
public:
/**
* @param s : A string
* @return : A string
*/
string reverseWords(string s) {
// write your code here
string rs;
for (int i = s.length()-1; i >= 0;){
while (i >= 0 && s[i] == ' ') i--;
if (i < 0) break;
if(!rs.empty()... | ALGO | 0.999957 | 5.482262 |
fdaf8128-aadb-444f-a545-7d1baaa5e098 | nida242004/cryptographic-algorithms | Extended-Euclidian/exeuclid.cpp | #include <iostream>
#include <stdexcept>
using namespace std;
// Function to calculate GCD and coefficients (x, y) using the Extended Euclidean Algorithm
int extendedEuclidean(int a, int b, int& x, int& y) {
if (b == 0) {
x = 1;
y = 0;
return a;
}
int x1, y1;
int gcd = extended... | ALGO | 0.999795 | 6.565997 |
ab08f689-01e4-4fb5-b086-7d0484b18dca | ewaty/Model-Predictive-Control | src/MPC.cpp | #include "MPC.h"
#include <cppad/cppad.hpp>
#include <cppad/ipopt/solve.hpp>
#include "Eigen-3.3/Eigen/Core"
using CppAD::AD;
size_t N = 6;
double dt = 0.15;
const double Lf = 2.67;
double ref_v = 30;
size_t x_start = 0;
size_t y_start = x_start + N;
size_t psi_start = y_start + N;
size_t v_start = psi_start + N;
siz... | ALGO | 0.999949 | 5.334081 |
1e3b634e-dbe4-4a2d-bd10-c93f0ffb6a2c | johnerik63/Curso_C_com_Estrutura_de_dados | 07 - Alocação Dinâmica/Aula43.cpp | #include<stdio.h>
#include<stdlib.h>
#include "fazSoma.h"
int main(){
int a;
int x;
int y;
int continuar;
while(true){
printf("\nDigite o primeiro valor: ");
scanf("%d", &x);
printf("Digite o segundo valor: ");
scanf("%d", &y);
a = fazSoma(x, y);
... | TOOL | 0.913306 | 3.840949 |
859424a1-76a3-44db-8cc3-c55cc10870ef | AgSpades/code-practice | codechef/Primality_Test.cpp | /*
Jai Bajrangbali!
author: agspades
year of code: 2025
template version: 0.1.1
*/
#include <bits/stdc++.h>
using namespace std;
#define fastio \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define ll long long
#define pb push_back
#define vi vector<int>
#define vvi vec... | ALGO | 0.999778 | 5.716185 |
4c6f78b2-b150-4789-a709-7b564eaee78c | Skyress-s/BaseOpenGL | Dependencies/OtherIncludes/eigen/doc/examples/DenseBase_template_int_middleCols.cpp | #include <Eigen/Core>
#include <iostream>
using namespace Eigen;
using namespace std;
int main(void)
{
int const N = 5;
MatrixXi A(N,N);
A.setRandom();
cout << "A =\n" << A << '\n' << endl;
cout << "A(:,1..3) =\n" << A.middleCols<3>(1) << endl;
return 0;
}
| ALGO | 0.99063 | 3.154174 |
fbff3a41-ef6e-4c23-a5b4-eb577ff193e2 | TrevorDeyo/LeetCodeProblems | 1678. Goal Parser Interpretation.cpp | #include <iostream>
#include <string>
class Solution {
public:
string interpret(string command) {
string interpreted = "";
for (int i = 0; i < command.length(); ++i) {
if (command[i] == 'G') {
interpreted += 'G';
} else if (command[i] == '(' && command[i + 1]... | ALGO | 0.996314 | 4.88652 |
05386d86-d87a-4c79-811a-dfe937629f11 | Rakesh-Visave/DSA-Practice_Problem | patterns/patter4.cpp | #include<iostream>
using namespace std;
int main(){
int n;
cout<<"Enter the Lenght of Array";
cin>>n;
for(int i=1; i<=n; i++){
for(int j=1; j<=n;j++){
cout<<n-j+1;
}
cout<<endl;
}
} | ALGO | 0.999838 | 3.632562 |
7082216b-515b-4125-b28a-d4a3f775669e | raincross7/code-similarity | codes/train_code/problem099/problem099_155.cpp | #include <bits/stdc++.h>
#define ALL(A) (A).begin(),(A).end()
#define ll long long
#define rep(i,n) for(int i=0;i<(n);i++)
const ll mod = 1e9+7;
const ll INF = -1*((1LL<<63)+1);
const int inf = -1*((1<<31)+1);
using namespace std;
int main(void){
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
v... | ALGO | 0.999952 | 3.675891 |
ce7cfcbf-b428-4a65-b3a9-b0544d7ca24d | zuhairsermiki/sem-1-cpp | circumference and radius question 2.cpp | #include<iostream>
using namespace std;
int main (){
double R;
double circumference,area;
const double π=3.14;
cout << "enter radius of sphere" << endl;
cin >> R;
circumference=4*π*(R*R*R) /3;
area=4*π*(R*R);
cout<<"circumference of sphere is :"<<circumference<<" square unit"<<endl;
cout<<"area of sphere... | ALGO | 0.934336 | 3.515378 |
f81b56bf-6877-4dad-905f-eb470fb843c2 | OmGamer3158/BOOP | p1-6/p4-4-1.cpp | #include<iostream>
#include<conio.h>
using namespace std;
float max(float &a,float &b,float &c)
{
if(a>b)
{
if(a>c){
return a;
}
else{
return c;
}
}
else{
if(b>c){
return b;
}
else{
return c;
}
}
}
int main()
{
float x,y,z;
cout<<"enter three number="<<endl;
cin>>x>>y>>z;
cout<<"max... | ALGO | 0.996634 | 3.589127 |
05b7c45b-023b-468b-98b1-039fd63c30a9 | BetaniaLoboViana/Algoritmos-para-o-Crivo-de-Esratotenes-em-v-rias-Linguagens | crivodeesrastotenesC++.cpp | #include <iostream>
#include <vector>
using namespace std;
void crivo(int n) {
vector<bool> Primo(n + 1, true); // Inicialmente, todos os números são primos
Primo[0] = Primo[1] = false; // 0 e 1 não são primos
for (int p = 2; p * p <= n; p++) {
if (Primo[p]) {
for (int i = p * p; i <= ... | ALGO | 0.999593 | 5.426288 |
f7c5de2b-60f5-4df8-9c6e-0589ea2a6f1d | khitishpanigrahi98/Hacker-Rank-Codes | HackerRank_Funny_String_done_by_me_learn_the_trick 2.cpp | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int n;
cin >> n;
for(int i = 0; i < n; i++){
string str;
cin >> str;
int j = str.length()-1;
bool state = true;
for(int i = 1; i < str.le... | ALGO | 0.998949 | 4.808969 |
07afb2f4-1233-4dc8-b7b9-bab32344eb47 | HTDerekLiu/intrinsic-simplification | src/barycentric_vector_to_cartesian.cpp | #include "barycentric_vector_to_cartesian.h"
std::complex<double> barycentric_vector_to_cartesian(
const Eigen::Vector3d & u,
const Eigen::MatrixXd & l,
const i... | ALGO | 0.995565 | 6.324811 |
b0348add-5441-46f4-a827-ae4834137633 | Alaxe/noi2-ranking | 2019/solutions/E/MPA-Vraca/odd.cpp | #include <iostream>
using namespace std;
int main() {
int a,b;
cin>>a>>b;
int broi;
broi=0;
int c[a+b+1];
for(int o=0;o<=a+b;o++){
c[o]=0;
}
for(int i=a;i<=b;i++){
for(int j=1;j<=i;j++){
if(j%i==0)c[i-1]++;
} if(c[i-1]%2==1)broi++;
}
cout<<broi/4;
}
| ALGO | 0.999873 | 3.627191 |
d20a29b0-bed6-48fc-b017-89d407dd1ad5 | ILOT-code/further | chapter_01/01-10.cpp | // UVa 11384
// 如果数堆中有i(i>1)个一样的数,则可以等价为只有一个该数
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
int n;
int solve(int x) { return x == 1 ? 1 : solve(x / 2) + 1; }
int main() {
while (~scanf("%d", &n)) printf("%d\n", solve(n));
return 0;
} | ALGO | 0.999919 | 4.072482 |
569ad408-1fc0-457e-84a5-21d232d91d53 | knightrome705/Flutter2 | 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.998784 | 6.761023 |
ae717db4-d580-4257-87d0-1aac43949d28 | thegamer1907/Code_Analysis | DP/397.cpp | #include <bits/stdc++.h>
using namespace std;
int a[105], b[105];
int main()
{
int n, m, sc=0, p=1;
cin >> n;
for(int i=1; i<=n; i++) cin >> a[i];
sort(a+1,a+n+1);
cin >> m;
for(int i=1; i<=m; i++) cin >> b[i];
sort(b+1,b+m+1);
for(int i=1; i<=n; i++)
for(int j=p; j<... | ALGO | 0.999959 | 3.324472 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.