uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
0a8988ed-c5b9-45f7-9ea6-a69ef7765d10 | Hima0X2/codechef-AtcoderSOLution | B - 81.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,a,b;
cin>>n;
for(a=1;a<10;a++)
{
for(b=1;b<10;b++){
if(a*b==n){
cout<<"Yes\n";
return 0;
}
}
}
cout<<"No\n";
}
| ALGO | 0.99988 | 4.167731 |
25482d4e-2332-4b7b-abff-e05ad9d70d72 | rajendratechment/user_session | 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.998733 | 6.76775 |
387fddfd-b978-4bea-b875-24457d75247a | Neoustc/Interview | Leetcode/128.longestConsecutiveSequence/128.cpp | The main idea is to use map to keep track of the boundary element and the length of the sequence.
When a new element n is inserted to the map.
1. if n - 1 and n + 1 exist in the map, we use left and right to denote the length of two sequences;
store the (left + right + 1) as the associated value to key n;
2. Updat... | ALGO | 0.999988 | 5.917936 |
b5306f1a-52b8-413a-af9f-c67829d7345b | Arhan13/seanprashad-leetcode-patterns | Heap/378. Kth Smallest Element in a Sorted Matrix/Codes/1.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
int kthSmallest(vector<vector<int>> &matrix, int k)
{
// We need a max heap
priority_queue<int> maxH;
for (int i = 0; i < matrix.size(); i++)
{
for (int j = 0; j < matrix[0].size(); j++)
... | ALGO | 0.999984 | 5.406865 |
e679dcfe-30c0-4eda-a42f-7fdaa9e94fe7 | haoyuanz13/Codings | arrayIssue/medianIssue.cpp | #include <vector>
#include <queue>
#include <iostream>
#include <algorithm>
#include <unordered_map>
using namespace std;
// create a contact comparison structure
struct myComparison
{
bool ascending;
// the deflaut order is desceng
myComparison(const bool &ascend = false){
ascending = ascend;
}
// def... | ALGO | 0.999999 | 5.621044 |
7de2f9eb-3061-40f5-974c-0cbbb09a636f | shreyansh2000rawat/Datastructure-and-Algorithm | array/Move all negative numbers to beginning and positive to end with constant extra space/main.cpp | #include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int ni = 0;
int arr[n];
int temp;
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
for(int i=0;i<n;i++)
{
if(arr[i]<0)
{
temp = arr[i];
arr[i] = arr[ni];
arr[ni... | ALGO | 0.99983 | 3.754353 |
3ad7789d-eb71-4719-aa8c-f096d4dade16 | trevorkerney/Cpp-Design-Patterns | Data Structures/TBinaryTree/tests/indev/main.cpp | #include <iostream>
using std::cout;
using std::endl;
#include "../../inc/TBinaryTree.h"
int main()
{
TBinaryTree<int> tbt;
tbt.insert(5);
tbt.insert(8);
tbt.insert(24);
tbt.insert(35);
tbt.insert(12);
tbt.insert(83);
tbt.insert(855);
tbt.insert(46);
tbt.insert(33);
tbt.in... | TEST | 0.982074 | 6.211801 |
5570bf46-e1cb-4b1f-84f6-a9fb5632a573 | alexwim/sat-solver | source/main.cpp | #include <iostream>
#include <vector>
#include <string>
#include "dimacs.h"
#include "cdcl.h"
#include "defs.h"
#include "cnf.h"
#define BUFFER_SIZE 1024
int main(int argc, char **argv) {
DimacsParser dp(std::cin);
CNF cnf;
try{
cnf = dp.readCNF();
std::cout << (cdcl(cnf) ? "SAT" : "UNSAT") << std::endl;
}... | ALGO | 0.984946 | 5.264621 |
d5ec24d5-767f-4cd9-9453-621ad4a1ab03 | SelynCatto/android_system_core | fastboot/fastboot.cpp | #include "fastboot.h"
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
#include <inttypes.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <c... | TOOL | 0.988572 | 4.733777 |
612f1618-8b63-4e35-99b9-109a2bedf433 | ishandutta2007/codeforces | jeroenodb/normal/1073/F.cpp | #include "bits/stdc++.h"
using namespace std;
#define all(x) begin(x),end(x)
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
template<typename T_container, typename T = typename enable_if<!is_same<T_container, string>::va... | ALGO | 0.999893 | 4.236587 |
9798f475-2e45-4542-a34c-b7c5a4c6da8a | ndbaolam/Algorithms | DSAv2/elevator.cpp | #include<bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define REP(i,a,b) for(int i = a; i <= b; ++i)
#define DREP(i,a,b) for(int i = a; i >= b; --i)
#define pii pair<int,int>
#define fi first
#define se second
using namespace std;
using ll = long long;
const int N = 25;
const ll mod = 1e9 + 7;
int n, k;
vector<int>... | ALGO | 0.999985 | 3.633887 |
284dd195-8eb9-44a8-ac43-d68442824e0e | 308866567/MyHistory | leetcode/46.cpp | #include <vector>
#include <iostream>
using namespace std;
class Solution
{
public:
vector<vector<int>> ans; //
int length; //Ԫظ
vector<int> track; //·
bool *used; //ʹù
public:
vector<vector<int>> permute(vector<int> &nums)
{
length = nums.size();
... | ALGO | 0.99999 | 4.875211 |
aa149146-8b01-4ff9-8423-80ac45239906 | Xenawn/Algorithm | BOJ_Cpp/5014.cpp | #include <bits/stdc++.h>
using namespace std;
int dist[1000002];
int main() {
int f, s, g, u, d;
queue<int> Q;
cin >> f >> s >> g >> u >> d;
fill(dist, dist + f+1, -1);
dist[s] = 0;
Q.push(s);
while (!Q.empty()) {
int cur = Q.front();
Q.pop();
for (int nx : {cur + u, cur - d}) {
if (nx <= 0 || nx >f... | ALGO | 0.999923 | 3.939078 |
7e825050-245c-45ae-8aec-f85c58ffd741 | Hansil-Chapadiya/CppPracticals | Practical-2/MH3_PR-02_PRG3.CPP | #include<iostream>
using namespace std;
int pow(int a=2, int n=2){
int ans=1;
for (int i = 0; i < n; i++)
{
ans=ans*a;
}
return ans;
}
int main(){
int a,n;
cout<<"Enter Base: ";
cin>>a;
cout<<"Enter power: ";
cin>>n;
cout<<"By given one value:"<<endl;
cout<<a<<"^2... | ALGO | 0.992598 | 4.207053 |
2825317f-fc3d-42e6-b511-3702fb7b2cc4 | Shikhar2110052/OATCP | 11.counting_subgrid/source.cpp | #include <bits/stdc++.h>
#pragma GCC target("popcnt")
using namespace std;
bitset<3001> B[3001];
int main()
{
int n, i, j, c = 0;
cin >> n;
for (i = 0; i < n; i++) cin >> B[i];
long long ans = 0;
for (int i = 0; i < n - 1; i++){
for (j = i + 1; j < n; j++){
int x = (B[i] & B[j])... | ALGO | 0.999993 | 4.522549 |
2978aa5a-b0a9-4951-bd24-4ba49ac5d55a | pratyushpanda91/Lab | daa/knapsack.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct Item
{
int weight;
int value;
double ratio;
};
bool compare(Item a, Item b)
{
return a.ratio > b.ratio;
}
double fractionalKnapsack(int W, vector<Item> &items)
{
sort(items.begin(), items.end(), compare);
double totalvalu... | ALGO | 0.999964 | 4.835884 |
63f42d1f-c153-45ba-b80a-c35cdc045397 | zero4drift/Cpp-Primer-5th-Exercises | chapter-9/9.28.cpp | #include <iostream>
#include <forward_list>
#include <string>
using std::cout;
using std::endl;
using std::forward_list;
using std::string;
void insert_ss(forward_list<string> &flst, string s1, string s2)
{
auto curr = flst.begin();
decltype(curr) temp;
while(curr != flst.end())
{
if(*curr == s1)
{
... | TOOL | 0.921308 | 5.395217 |
0b90f2f2-dd57-426f-8617-d54792b48a70 | tlsgkdns/study | DataStructure/Graph-Tree/ShortestPath/2325_warOfAntAndElephant.cpp | #include <iostream>
#include <queue>
using namespace std;
using ll = long long;
priority_queue<pair<ll, int>> pq;
vector<pair<int, ll>> adj[1001];
int N, M, X, Y, Z, P[1001];
ll D[1001], ans = 0;
void dijkstra(int a, int b, bool r)
{
for (int i = 2; i <= N; i++) D[i] = 100000000000000007L;
D[1] = 0;
pq.push({ 0, 1 ... | ALGO | 0.999729 | 4.416996 |
da3ce3f2-e2dd-4d71-bed1-70e6bbc5066a | 77Arafat383/Previous-contest-problem | D_D.cpp | //**************BISMILLAHIR RAHMANIR RAHIM****************
//*******************Md Yeasin Arafat****************
#include<bits/stdc++.h>
using namespace std;
#define check cout<<'?'<<endl;
#define ll long long
#define Judge(x) x==0 ? cout<<"NO\n" : cout<<"YES\n";
#define judge(x) x==0 ? cout<<"No\n" : ... | ALGO | 0.999992 | 3.937434 |
0e590a56-959a-4f8f-bd70-29edd3ec9710 | rheit/zdoom | src/p_teleport.cpp | #include "templates.h"
#include "doomtype.h"
#include "doomdef.h"
#include "s_sound.h"
#include "p_local.h"
#include "p_terrain.h"
#include "r_state.h"
#include "gi.h"
#include "a_sharedglobal.h"
#include "m_random.h"
#include "i_system.h"
#include "doomstat.h"
#include "d_player.h"
#include "p_maputl.h"
#include "r_ut... | TOOL | 0.909203 | 5.597289 |
d2955bf5-1065-40ef-95e5-5c2b4abcc08c | josuerom/Competitive-Programming | Training/UVa/CP3/Introduction/Easy Problems/Super Easy/11172 - Relational Operator.cpp | // Time: 02:00min
#include <bits/stdc++.h>
#define endl '\n'
#define debug(X) cout << #X << " = " << X << endl
#define fori(i,b,e) for (int i = (b); i < (e); ++i)
#define mod(x,m) ((((x) % (m)) + (m)) % (m))
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<i... | ALGO | 0.999951 | 4.292331 |
9a125ec9-65d3-4618-bdaa-b9b07b899290 | Zobio/atCoder-works | work/abc200e.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define MOD 1000000007
#define INF 100000000000000
int main() {
ll n, k;
cin >> n >> k;
vector<vector<ll>> dp(4, vector<ll>(3000010));
vector<vector<ll>> cum(4, vector<ll>(3000010));
dp[0][0] = 1;
for(int i = 1; i <... | ALGO | 0.999964 | 3.337686 |
b63c7c22-1988-4a3a-9ab5-d6aba5cdee2c | itadakimatsu97/CompetitiveProgrammingMaterials | UVa Solved Problems/Graph/SSSP Dijkstra/UVa-00929.cpp | #include <bits/stdc++.h>
#include <algorithm>
using namespace std;
/****** Template of MACRO/CONSTANT *****/
#define INF INT_MAX
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end() //Forward traversal
#define rall(x) (x).rbegin, (x).rend() //reverse t... | ALGO | 0.999946 | 4.458754 |
f526bb43-38f9-442d-9990-a8db453d1627 | AyushKUMAR031/Leetcode-Practise-CPP | Folder_To_Q0010+/Q84_Largest_Rectangle_in_Histogram.cpp | //working code //not best //but easiest
class Solution {
private:
vector<int>nextSmallerElement(vector<int>& heights,int n){
stack<int> nst;
vector<int> nse(n);
nst.push(-1);
for(int i = n-1;i>=0;i--){
while(nst.top() != -1 && heights[nst.top()] >= heights[i]){
... | ALGO | 0.999989 | 6.612544 |
844747f2-93cc-4254-9814-2ecf027f4d0b | raihanislam-71/Phitron | c++/Module_1/Basic_c++/Ternary_operator.cpp | #include<iostream>
using namespace std;
int main()
{
int n;
cin >> n;
(n % 2 == 0) ? cout << "Even\n" : cout << "Odd\n";
return 0;
} | ALGO | 0.999721 | 4.121122 |
f4b43604-2fa2-4480-a892-19417bffb800 | Jocastle98/codetree-TILs | 240816/배열의 평균/ave-of-array.cpp | #include <iostream>
using namespace std;
int main() {
// 2차원 배열을 구현합니다.
int arr_2d[2][4];
int sum;
// 각 줄마다 정수를 입력받습니다.
for(int i = 0; i < 2; i++)
for(int j = 0; j < 4; j++)
cin >> arr_2d[i][j];
cout << fixed;
cout.precision(1);
// 가로 평균을 출력합니다.
for(int i = 0; i < 2; i++) {
sum = 0;
for(int... | ALGO | 0.999325 | 3.665917 |
b01b2a63-ec82-4c42-ac01-affb9d50e810 | codesniper99/Coding-Competitions | Coding Practice/Overloading operators/main.cpp | #include <iostream>
#include<stdio.h>
using namespace std;
class Complex{
public:
int real,imaginary;
void input()
{
cout<<"Enter real and imag part\n";
cin>>real>>imaginary;
}
Complex operator+(Complex);
void output()
{
cout<< "\n\... | ALGO | 0.886704 | 4.185898 |
a83887be-bf82-4d4a-a75a-c9e3b9fad0c5 | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_train_2227_0.cpp | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
const int inf = 1e9;
class Point {
public:
int x;
int y;
bool operator<(const Point &) const;
};
class Range {
public:
int x;
int b;
int t;
};
bool Point::operator<(const Point &rhs) const { return x < rhs.x; }
int n;
Point p[maxn];
int r... | ALGO | 0.999951 | 4.895049 |
ae0c1949-c2c5-4827-bdc3-d4875f07c0bd | raincross7/code-similarity | codes/train_code/problem456/problem456_267.cpp | #include<iostream>
#include<algorithm>
using namespace std;
const int N=1e5+10;
typedef pair<int,int> pii;
pii a[N];
int main()
{
int n;
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>a[i].first;
a[i].second=i;
}
sort(a,a+n+1);
for(int i=1;i<=n;i++)
cout<<a[i].second<<" ";
} | ALGO | 0.999892 | 3.45541 |
7eccb89c-f67e-4211-9982-2c1b956907c5 | raincross7/code-similarity | codes/train_code/problem083/problem083_419.cpp | #include<bits/stdc++.h>
#include<string.h>
typedef long long int ll;
#define all(x) (x).begin(), (x).end()
using namespace std;
int nxt() {
int x;
cin >> x;
return x;
}
ll nxtl(){
ll x;
cin>>x;
return x;
}
void SieveOfEratosthenes(int n,vector <int> &primes)
{
// Create a boolean a... | ALGO | 0.999839 | 3.944284 |
4999a7a5-5be1-4f44-9c32-3397941f5b11 | wsyunine/ACM | 2023-2024/003 进队/每日一题/J.cpp | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<cstdlib>
#include<ctime>
#include<bitset>
#include<vector>
#include<climits>
#include<iomanip>
using namespace std;
#define N 800010
template<typename T>
inline ... | ALGO | 0.999995 | 4.091739 |
dc96db98-53b5-4a9e-930c-07bdefa5a102 | Abhinav-Kosta/ACC45DAYSOFCODE-2024 | Day2-Subscriptions.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
cin >> t;
for(int i = 0; i < t; i++){
int n,x;
cin >> n;
cin >> x;
int quo = n/6;
int rem = n%6;
if(rem != 0){
quo++;
}
cout << x*quo << endl;
}
} | ALGO | 0.99975 | 3.729594 |
e82ff618-7823-47da-9291-a000d5991b05 | sarvex/leetcode-io | solution/1600-1699/1602.Find Nearest Right Node in Binary Tree/Solution.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.999965 | 6.256085 |
64625c8f-81ae-446d-9fbc-5e626fac50f9 | Shourya70073/Calculator_Soft_UI | 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.998859 | 6.785645 |
ee7ce18b-3365-4d11-add8-a9b1eac16a32 | timwroge/Dynamics | example/LinearSystemExample.cpp | #include <dynamics/Dynamics.hh>
#include <dynamics/LinearSystem.hh>
#include <vector>
#include <functional>
using InputType = std::vector<double>;
using StateType = double;
using TransformationType= std::function<State<StateType>(State<StateType>);
State<StateType> linearTransformation(InputType const & state){
r... | ALGO | 0.980686 | 5.689782 |
9af62e38-2107-4799-854d-5ace35aa4fb0 | wxpftd/CPlusPlusNormalExam | CountWords/Counter.cpp | #include <iostream>
#include <fstream>
#include "Counter.h"
#include <ctype.h>
#include <cstring>
#include <vector>
Counter::Counter()
{
this->wordCount = 0;
this->filePath = nullptr;
}
Counter::Counter(char* filePath)
{
this->filePath = filePath;
this->wordCount = 0;
fin = new std::ifstream(fileP... | TOOL | 0.89574 | 4.300786 |
0e634f95-4747-4f0d-b239-e3415de9b757 | M680x0/M680x0-llvm | lib/Transforms/IPO/Inliner.cpp | #include "llvm/Transforms/IPO/Inliner.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringR... | TOOL | 0.883281 | 4.790247 |
ee7a85ad-5f94-4338-b6c3-359f2c6696bd | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_9185_9.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 2 * 1e5 + 10;
const int M = 1e6 + 10;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
int a[N], d[N * 2];
void solve() {
int n, k;
cin >> n >> k;
for (long long i = 0; i < 2 * k + 10; i++) d[i] = 0;
for (long long i = 1; i < n + 1; i++) cin >> a[i... | ALGO | 0.999888 | 4.880088 |
76674379-cffd-4bd9-bb27-b11d472dee4a | kiranatmakuri516/LEETCODE | 2079-watering-plants/2079-watering-plants.cpp | class Solution {
public:
int wateringPlants(vector<int>& a, int c) {
int i,j,k,l,m,n,p,q;
n=a.size();
m=c;
p=1;
c-=a[0];
for(i=1;i<n;i++)
{
cout<<p<<" ";
if(c>=a[i])
{
p++;
c-=a[i];
}
else
{
... | ALGO | 0.999995 | 4.351591 |
e69752fb-cfb4-4cd7-9048-69b2e8a0b4ee | ishandutta2007/codeforces | xlk/normal/1699/B.cpp | #include <bits/stdc++.h>
using namespace std;
int t, n, m;
int main()
{
cin >> t;
for (int tt = 0; tt < t; tt++)
{
cin >> n >> m;
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= m; j++)
{
cout << (((i ^ j) >> 1) & 1) << " ";
}
cout << endl;
}
}
return 0;
} | ALGO | 0.99986 | 3.844047 |
9823155e-0501-4b3a-974f-5a9d34d02288 | Devjyoti29/mock | HPC/bfs_dfs.cpp | #include<iostream>
#include<vector>
#include <omp.h>
#include <iomanip>
#include<queue>
#include<stack>
using namespace std;
class Graph{
public:
int V;
vector<vector<int>> graph;
Graph(int v){
V = v;
graph.resize(v);
}
void addEdge(int i, int j){
graph[i].push_back(j);
graph[j].push_back(i);
}
vo... | ALGO | 0.999017 | 4.533062 |
e0141f1b-7f74-44d8-88e3-7214b1b25eea | SergeySinyavskiy/ECC | Elliptic curves/boost_1_70_0/libs/regex/performance/table_helper.cpp | #ifdef _MSC_VER
# pragma warning (disable : 4224)
#endif
#include <boost/regex.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/functional/hash.hpp>
#include <vector>
#include <set>
#include <iostream>
#include <sstream>
#include <iomanip>
... | TOOL | 0.928606 | 4.614598 |
79983a08-ee90-4a52-bbd6-4a951a101126 | borisdayma/CarND-Path-Planning-Project | src/Eigen-3.3/doc/examples/function_taking_ref.cpp | #include <iostream>
#include <Eigen/SVD>
using namespace Eigen;
using namespace std;
float inv_cond(const Ref<const MatrixXf>& a)
{
const VectorXf sing_vals = a.jacobiSvd().singularValues();
return sing_vals(sing_vals.size()-1) / sing_vals(0);
}
int main()
{
Matrix4f m = Matrix4f::Random();
cout << "matrix m:... | ALGO | 0.999686 | 5.282894 |
678cdcd8-e4a6-4e3c-91ee-52a401ac2f44 | Sunzhengmao/LeetCode | DataType/binaryTree/110_balanced_bintree/balanced_bintree.cpp | #include <vector>
#include<iostream>
#include<queue>
using namespace std;
// Definition for a binary tree node.
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
bool isBalanced(TreeNode* root)
{... | ALGO | 0.99999 | 6.32204 |
4434b3c9-840a-419d-8872-c30ef941f0f5 | citm-programacio/11-1-linked-lists-exercise-emmacasvil | Linked_Lists.cpp | // Linked_Lists.cpp : Este archivo contiene la función "main". La ejecución del programa comienza y termina ahí.
//
#include <iostream>
using namespace std;
// Declaration of a doubly-linked list
class List {
private:
// Internal struct for list nodes
struct Node {
int value;
Node* next;
Node* prev;
Node(i... | ALGO | 0.99056 | 4.923718 |
a268253c-4310-4add-b66e-3d5083576a51 | salimmia/Problem-Solving | Code_Template/Notes and files/KnightMare of Anachor/Temp/betterUnorderdMap.cpp | #include<bits/stdc++.h>
using namespace std;
const int N = 2e5;
struct custom_hash {
static uint64_t splitmix64(uint64_t x) {
// http://xorshift.di.unimi.it/splitmix64.c
x += 0x9e3779b97f4a7c15;
x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
... | ALGO | 0.994505 | 3.890806 |
868cb3ac-6e50-4bc8-806e-db448c1d60f9 | hajimeIppo-cmd/cp-codes | Baekjoon OJ/01000-01999/1406.cpp | #include <iostream>
#include <list>
#include <cstring>
using namespace std;
list<char> word;
int main() {
char arr[100001];
scanf("%s", arr);
int len = strlen(arr);
for (int i = 0; i < len; i++)
word.push_back(arr[i]);
int n;
scanf("%d", &n);
list<char>::iterator it = word.end();
for (int test = 0; test ... | ALGO | 0.999915 | 3.768004 |
a4c926d5-1083-4a48-94ac-cd9f6c81cd03 | Gj0705/RELOCALIZATION | 第一章 概述/lidar_localization/third_part/gtsam-4.0.2/gtsam/3rdparty/Eigen/test/sparse_permutations.cpp | static long int nb_transposed_copies;
#define EIGEN_SPARSE_TRANSPOSED_COPY_PLUGIN {nb_transposed_copies++;}
#define VERIFY_TRANSPOSITION_COUNT(XPR,N) {\
nb_transposed_copies = 0; \
XPR; \
if(nb_transposed_copies!=N) std::cerr << "nb_transposed_copies == " << nb_transposed_copies << "\n"; \
VERIFY( (#XPR... | TEST | 0.990092 | 6.262296 |
2a7a63a5-2285-4885-a488-39b6b22ddcd6 | Mafia-1911/Phitron-DSA | Doubly Linked List/9_2 Print Doubly LL.cpp | #include <bits/stdc++.h>
using namespace std;
void printForward(Node* head){
Node* temp=head;
while(temp !=NULL){
cout<<temp->value<<" ";
temp=temp->next;
}
}
void printBackward(Node* tail){
Node* temp=tail;
while(temp !=NULL){
cout<<temp->value<<" ";
temp=temp->prev... | ALGO | 0.999893 | 4.644157 |
209b901b-8ad5-4358-a1c5-886612e1bbdb | AbdullahAssi/prac_ | div.cpp | #include <iostream>
using namespace std;
int main() {
int num1, num2;
// Read in the two numbers
cout << "Enter the first number: ";
cin >> num1;
cout << "Enter the second number: ";
cin >> num2;
// For loop
cout << "Numbers divisible by 7, 9, and 13 between " << num1 << " and " << num2 << " using a ... | ALGO | 0.999676 | 5.484826 |
40cfab08-4027-4b1e-a68e-2f1ea7812d3a | edge555/Online-Judge-Solves | Codechef/Smallest Numbers of Notes.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <t... | ALGO | 0.999889 | 3.21519 |
99a1d756-4db4-400c-b2bb-b097e8cbfbff | Zimse12345/Code | Codeforces_Contest/CF1702/G.cpp | #include <cstdio>
#include <algorithm>
#include <cstring>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <iostream>
#include <cstdlib>
#include <ctime>
#define int long long
#define ull unsigned long long
using namespace std;
inline int read(){int qrx=0,qr... | ALGO | 0.999946 | 4.508549 |
83dc8302-612e-48b9-b789-d4646fc00e05 | reykjavik-university/2016-T-201-GSKI | Fyrirlestrar/Pointers/ArrayOfSets/set.cpp | #include <algorithm>
#include "set.h"
using namespace std;
Set::Set()
{
}
bool Set::exist(int num) {
//vector<int>::iterator it;
//it = find(data.begin(), data.end(), num);
//return (it != data.end());
for (unsigned int i = 0; i < data.size(); i++)
if (num == data[i])
return true;... | TOOL | 0.978329 | 4.05522 |
1aebf3d5-ce45-49dc-92c9-075584f540e1 | josehpg98/Algorithms | A-II_2020.1/Exercicios/ListaEXercicios3/exercicio2.cpp | #include<iostream>
#include<cstdlib>
#include<cstdio>
using namespace std;
void geravetor(int v[]);
void mostravetor(int v[]);
main()
{
setlocale(LC_ALL,"Portuguese");
int v[50];
geravetor(v);
mostravetor(v);
}
void geravetor(int v[]){
for(int i = 1;i < 51;i++){
v[i] = (i + 5 * i)% i + 1;
... | ALGO | 0.99925 | 3.174664 |
eda9dfce-3ca3-4355-bb60-9c1c614ac11b | SkyLoaderr/xray-engine-repo | xr_3da/xrGame/alife_human_behaviour.cpp | ////////////////////////////////////////////////////////////////////////////
// Module : ai_alife_human_fsm.cpp
// Created : 24.07.2003
// Modified : 24.07.2003
// Author : Dmitriy Iassenev
// Description : A-Life humans FSM
////////////////////////////////////////////////////////////////////////////
#include "s... | ALGO | 0.929931 | 4.4347 |
db3063aa-b410-4f62-85d5-e23630c3bf09 | PixelOS-Fourteen/external_skia | tools/flags/CommonFlagsConfig.cpp | #include "tools/flags/CommonFlagsConfig.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkSurfaceProps.h"
#include "src/core/SkColorSpacePriv.h"
#include "src/core/SkSurfacePriv.h"
#include "src/core/SkTHash.h"
#include <stdlib.h>
#include <string_view>
#include <unordered_map>
using sk_gpu_test::GrC... | CONFIG | 0.950436 | 7.384184 |
4f36d492-43c8-4f1e-9d57-a52779fc729b | ishubarman7/data-structure_And_Algorithm_Through_CPlusPlus | lecture-3/L3_P7.cpp | // * * * * *
// * * * * *
// * * * * *
// * * * * *
// * * * * *
#include<iostream>
using namespace std;
int main()
{
int n;
cout<< "enter the value of n: ";
cin>> n;
int i = 1;
while(i<=n)
{
int j = 1;
while(j<=n)
{
cout<< " * ";
... | ALGO | 0.999562 | 3.630004 |
9208b7dd-9483-44f5-bac9-95f6943816b0 | jinheng49/23fall-bustub | src/execution/hash_join_executor.cpp | #include "execution/executors/hash_join_executor.h"
#include <memory>
#include "storage/table/tuple.h"
namespace bustub {
HashJoinExecutor::HashJoinExecutor(ExecutorContext *exec_ctx, const HashJoinPlanNode *plan,
std::unique_ptr<AbstractExecutor> &&left_child,
... | TOOL | 0.869397 | 3.416161 |
0b1486e5-ae0a-4ce4-890e-702e8ad41617 | Fayoumi98/Udacity-Self-Driving-Car-ND-Part-2-Sensor-Fusion-Localization-and-Control | Module 04_ Control/Lesson 04: Model Predictive Control/mpc_to_line/src/Eigen-3.3/doc/examples/tut_matrix_coefficient_accessors.cpp | #include <iostream>
#include <Eigen/Dense>
using namespace Eigen;
int main()
{
MatrixXd m(2,2);
m(0,0) = 3;
m(1,0) = 2.5;
m(0,1) = -1;
m(1,1) = m(1,0) + m(0,1);
std::cout << "Here is the matrix m:\n" << m << std::endl;
VectorXd v(2);
v(0) = 4;
v(1) = v(0) - 1;
std::cout << "Here is the vector v:\n... | ALGO | 0.99495 | 3.687909 |
f6cfc953-4e4f-4dae-960a-028226dce070 | deliwalayash/dsa | patterns/pattern-8.cpp | #include<iostream>
using namespace std;
int main(){
int i,j;
for(i=1;i<=5;i++)
{
for(j=i;j>=1;j--){ // when first line there is alternate number than j=i
cout << j << " ";
}
cout<< endl;
}
}
// 1
// 2 1
// 3 2 1
// 4 3 2 1
// 5 4 3 2 1 | ALGO | 0.999985 | 3.653168 |
02bf7566-bbf8-4792-a2e3-9ca8be6a5d4a | Micronet-Ltd/sc600-android-root | bionic/libc/bionic/swab.cpp | #include <unistd.h>
void swab(const void* void_src, void* void_dst, ssize_t byte_count) {
const uint8_t* src = static_cast<const uint8_t*>(void_src);
uint8_t* dst = static_cast<uint8_t*>(void_dst);
while (byte_count > 1) {
uint8_t x = *src++;
uint8_t y = *src++;
*dst++ = y;
*dst++ = x;
byte_c... | TOOL | 0.93106 | 4.875747 |
241cc6ae-40f2-427e-8928-7dfbfd788a6f | geoffgeorgein/CP | 1/702D.cpp | #include<bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
#define rall(x) x.rbegin(),x.rend()
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define F first
#define S second
#define ll ... | ALGO | 0.999852 | 3.912343 |
95701c0e-b701-4f2d-9d23-78e8bf8de826 | Karanpratap20/LeetCode-DSA | 1448-maximum-69-number/maximum-69-number.cpp | class Solution {
public:
int maximum69Number (int num) {
int a=num,count=0;
while(a!=0)
{
a/=10;
count++;
}
int arr[count];
for(int i=count-1;i>=0;i--)
{
arr[i]=num%10;
num=num/10;
}
for(int i=0;i... | ALGO | 0.999293 | 6.20505 |
248855dc-0615-445d-a492-8e5b2eaad6fb | Anubhav12345678/competitive-programming | FlattenABinaryTreeToLinkedList.cpp | /* Program to flatten a given Binary
Tree into linked list */
#include <iostream>
using namespace std;
struct Node {
int key;
Node *left, *right;
};
/* utility that allocates a new Node
with the given key */
Node* newNode(int key)
{
Node* node = new Node;
node->key = key;
node->left = node->right = N... | ALGO | 0.999998 | 5.658795 |
a256fc6c-1144-4a6b-ac3f-9b6e99f320e8 | averyli290/usaco-cf-solutions | _codeforces/755/a.cpp | /*
Problem link: https://codeforces.com/contest/755/problem/A
*/
#include <bits/stdc++.h>
using namespace std;
#define sz(x) int((x).size())
#define all(x) begin(x), end(x)
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
const long long INF =... | ALGO | 0.999956 | 4.317824 |
53c60ffe-42ad-4afc-9d90-369a21ed61b4 | Venkatramanbehera/DSA-CPP | basic_questions/riverse_Integer.cpp | #include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int res = 0;
while (n != 0)
{
int rem = n % 10;
// solution - 1
// if (n / 10 != 0)
// {
// res = (res + rem) * 10;
// }
// else
// {
// res = re... | ALGO | 0.999857 | 4.939145 |
eec17a39-d849-4845-ba26-541c939d5c65 | orlandoisay/Competitive-Programming | COJ/1273.cpp | #include <bits/stdc++.h>
using namespace std;
int T,A,B,C;
int main() {
scanf("%d",&T);
while(T--) {
scanf("%d %d %d",&A,&B,&C);
A++;
printf("%d\n",B*C*((A*(A+1))/2));
}
return 0;
}
| ALGO | 0.998131 | 4.274524 |
2614ae50-32ea-4fab-b785-9e33e5ccda7a | shreya9570/Assignment_Btech2026_-2201921690050- | 0238-product-of-array-except-self/0238-product-of-array-except-self.cpp | class Solution {
public:
vector<int> productExceptSelf(vector<int>& nums) {
int n = nums.size();
vector<int> answer(n, 1);
int prefix = 1;
for (int i = 0; i < n; i++) {
answer[i] = prefix;
prefix *= nums[i]; // now this uses original nums[i]
}
... | ALGO | 0.999976 | 6.660776 |
1271b2f5-4183-43c3-8bc5-5717e4e3b7dd | rvgpu/rvgpu-llvm | libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/complexity.pass.cpp | // UNSUPPORTED: c++03, c++11
// <algorithm>
// template<class Iter>
// void sort_heap(Iter first, Iter last);
#include <algorithm>
#include <cassert>
#include <random>
#include "test_macros.h"
struct Stats {
int compared = 0;
int copied = 0;
int moved = 0;
} stats;
struct MyInt {
int value;
expli... | TEST | 0.994519 | 5.709414 |
b55765a0-66f4-4974-a901-b9108f3ef1de | alamgir65/Competitive_Programming | Codechef Contest/Starters 119/p.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t; cin>>t;
while(t--){
int n,q; cin>>n>>q;
string s; cin>>s;
// int frq[26]={0};
int mx=1;
int cnt=1;
for(int i=0;i<n-1;i++){
if(s[i]==s[i+1]){
cnt++;
mx=max(mx,cnt);... | ALGO | 0.999802 | 3.759927 |
347b516e-fcd5-47cf-973a-c3381268dd6a | sadrultoaha/Competitive-Programming | Online Judge Solves/CodeForces/CF 1084A. The Fair Nut and Elevator.cpp | /**
author: SadrulToaha
status:
**/
#include<bits/stdc++.h>
using namespace std;
/****** Type Define *********/
typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
typedef vector<int> VCI;
typedef vector<LL> VCLL;
typedef vector<doubl... | ALGO | 0.999794 | 3.194927 |
0d569b3c-aacd-4c56-87af-4fd7116d65af | Yaro2709/AlgoProblems | 6/1612A.cpp | #include <iostream>
#include <math.h>
using namespace std;
void solve() {
int a, b;
cin >> a >> b;
if ((a + b) % 2) {
cout << "-1 -1" << endl;
return;
}
else {
int k = (a + b) / 2;
int f = min(k, a);
cout << a - f << " " << b - (k - f) << endl;
}
}
int ... | ALGO | 0.999945 | 5.070556 |
3c80168f-18c5-4686-bac4-6187d974d100 | andrewqt/Competitive-Programming | CodeForces/_0516_D_DrazilAndMorningExercise/_0516_D_DrazilAndMorningExercise.cpp | #include <bits/stdc++.h>
using namespace std;
int N, Q;
vector<pair<int, int>> graph[100005];
int par[20][100005];
long long dist[2][100005];
long long val[100005];
int cnt[100005];
void dfs1(int n, int t, int p){
for(auto e : graph[n]){
if(e.first != p){
dist[t][e.first] = dist[t][n] + e.sec... | ALGO | 0.999854 | 4.307868 |
9adf5892-5840-444a-ab96-c380a636112d | raincross7/code-similarity | codes/train_code/problem027/problem027_276.cpp | #include<iostream>
using namespace std;
void Grade(int m, int f, int r);
int main(){
int m[50], f[50], r[50];
int i = 0;
while(1){
cin >> m[i] >> f[i] >> r[i];
if(m[i] == -1 && f[i] == -1 && r[i] == -1) break;
i++;
}
for(int j = 0; j < i; j++){
Grade(m[j],... | ALGO | 0.998565 | 3.785857 |
3c5090f9-6baf-4e89-a1a7-c37ed6ed3a1a | M0hamed-Gamall/MicroMouse | algorithm.cpp | #include <Arduino.h>
#include "algorithm.h"
#include "motors.h"
#include "sensors.h"
int dx[4] = {1, 0, -1, 0}; // order matched with the directions for the maze
int dy[4] = {0, 1, 0, -1};
int current_x = 0;
int current_y = 0;
bool solved = false;
int maze[maze_size][maze_size] = {0};
bool vis[maze_size][maze_size] ... | ALGO | 0.999819 | 3.685171 |
257162b6-0b0b-443b-a4f7-7f90b95b7860 | yashj1579/AdventOfCode2024 | Day17/prob1.cpp |
//Starting Code
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <fstream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <regex>
#include <functional>
#define prints(x) for (auto &i : x) {cout << i << " ";} cout << endl;
#define printss(x) for (auto &i :... | ALGO | 0.999034 | 4.077263 |
6d53e03b-010f-492b-86e5-a17d0f1b664a | JohnsonKamanga123/bsc-com-09-21-COM221-Lab-Tasks | lab 5/Exercise_3.cpp | #include <iostream>
#include <string>
#include <iterator>
using namespace std;
int main(){
string list [] = {"B123",
"C234",
"A345",
"C15",
"B177",
"G3003",
"C235",
... | ALGO | 0.913612 | 3.760286 |
b7e5d09f-d9ce-444a-abbc-bba8a445738b | b2utyyomi/C-primer-the-4th-version | 9-28.cpp | /*******************************
author: yomi
date: 17.4.1
ps: 9-28... ֵ ȫͬ Ԫͬ á= Ͳͬ Ԫͼ
ʹassign
*******************************/
#include<iostream>
#include<list>
#include<vector>
#include<string>
#define NDEBUG
using namespace std;
int main()
{
vector<string>vec;
#ifndef NDEBUG
string s;
while(cin >... | TOOL | 0.928151 | 3.165574 |
f39b3bb2-a86f-464f-9e30-2d6cf1fa740b | leonardoAnjos16/Competitive-Programming | Codeforces/puzzle_pieces.cpp | #include <bits/stdc++.h>
using namespace std;
#define long long long int
int main() {
int t; scanf("%d", &t);
while (t--) {
long n, m; scanf("%lld %lld", &n, &m);
printf("%s\n", n * m <= n + m ? "YES" : "NO");
}
} | ALGO | 0.999663 | 4.900624 |
ab8fa2d5-68e0-48d0-b6b0-46782fbb7408 | harshjoeyit/CP | graph/graphs_max_flow_ford_fulk.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long int
const int INF = 10e+7;
const int N = 100;
int n;
vector<vector<int>> cpct;
vector<int> g[N];
int bfs(int s, int t, vector<int> &p) {
fill(p.begin(), p.end(), -1);
p[s] = -2;
queue<pair<int, int>> q;
q.push({s, INF});
while(! q.empty()) {
i... | ALGO | 0.999946 | 4.741613 |
5dbf3506-39e7-4a65-aa07-b1003dc13a37 | lxiao217/study428 | 深度学习/源码/OpenCV/opencv_contrib/modules/bioinspired/samples/cpp/OpenEXRimages_HDR_Retina_toneMapping_video.cpp | #include <iostream>
#include <stdio.h>
#include <cstring>
#include "opencv2/bioinspired.hpp" // retina based algorithms
#include "opencv2/imgproc.hpp" // cvCvtcolor function
#include "opencv2/highgui.hpp" // display
#ifndef _CRT_SECURE_NO_WARNINGS
# define _CRT_SECURE_NO_WARNINGS
#endif
static void help(std::string ... | TOOL | 0.866836 | 5.074901 |
68b61006-e799-4e3d-b724-fc3795af1b9d | Shubhrajyoti-Dey-FrosTiK/My-Codes | CodeChef /February_Challenge/MaximiseFunction/MaximiseFunction.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main()
{
ll TestCases,NoOfElements;
cin>>TestCases;
vector <ll> Store;
for(ll i=0;i<TestCases;i++)
{
cin>>NoOfElements;
ll DummyVar;
for(ll j=0;j<NoOfElements;j++)
{cin>>DummyVar; Store.push_ba... | ALGO | 0.99771 | 3.947735 |
9702f480-3567-4bff-95be-f9e416a46a1b | lshpku/gem5-runahead | src/systemc/tests/systemc/misc/synth/combo/switch4/switch4.cpp | /*****************************************************************************
switch4.cpp --
Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
*****************************************************************************/
/****************************************************************************... | ALGO | 0.961164 | 5.256051 |
aea692d8-b6a6-4a76-99b8-69bf56b5ebff | Narender79/CPP | Code_Force/Football.cpp | #include<iostream>
#include<string>
using namespace std;
int main()
{
string s;
cin>>s;
char ch=s[0];
int cnt=1;
for(int i=1;i<s.length();i++)
{
if(cnt==7){break;}
if(ch==s[i]){ cnt++;}
else { ch=s[i]; cnt=1;}
}
if(cnt==7){cout<<"YES"<<endl;}
e... | ALGO | 0.999684 | 3.420869 |
3b34dacb-b290-4957-ac6a-0932f7aaa698 | ivbalashov/spec_experiments | AutomataSearch/coo_bench.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include <benchmark/benchmark.h>
#define RUNTIME_ENABLE_JIT
#include <anydsl_runtime.hpp>
const std::string ARTIC_SOURCE = "automata.impala";
struct CooDfaElement
{
int32_t from, to;
char trans_symbol;
};
std::st... | TOOL | 0.946802 | 5.694173 |
22abbdb6-ab61-4889-93d4-734a6585acc5 | martin-simeonov/FMI | hw01/t1b/task1b.cpp | #include <iostream>
#include <string>
using namespace std;
int main() {
float x, y;
cout << "x=";
cin >> x;
cout << "y=";
cin >> y;
float cx = 4;
float cy = -2;
float r;
string where = "outside";
if (x >= 0 && x <= 8 && y >= -6 && y <= 0) {
float arc = (x - cx)*(x - cx) + (y - cy)*(y - cy);
if (y <=... | ALGO | 0.999417 | 3.920721 |
a62eaa24-86b4-4b0b-95ba-3cb421272d01 | ishandutta2007/codeforces | l7-56/normal/1738/G.cpp | // LUOGU_RID: 93358146
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
typedef pair <int, int> pii;
typedef vector <int> vi;
#define fir first
#define sec second
const int maxn = 1010;
int n, k, dlt[maxn][maxn];
char s[maxn][maxn], ans[maxn][maxn];
void work() {
scanf("%d%d", &n... | ALGO | 0.999969 | 3.591253 |
18b3eaa8-901e-4a0b-9bc3-0a6591bdaae0 | Syncpine/LeetCodeSolutions | Array/1886. Determine Whether Matrix Can Be Obtained By Rotation.cpp | class Solution {
public:
bool findRotation(const std::vector<std::vector<int>>& mat, const std::vector<std::vector<int>>& target)
{
return Rotating_0(mat, target)
|| Rotating_90(mat, target)
|| Rotating_180(mat, target)
|| Rotating_270(mat, target);
}
private:
... | ALGO | 0.999924 | 6.278949 |
701b5fef-5eb5-4b1b-90f9-1edfe51af060 | Andrew193/c-plus-plus-labs | 2 semestr 1 laba/2 semestr 1 laba/2 semestr 1 laba.cpp | #include <iostream>
#include <fstream>
#include <cstring>
#include <windows.h>
#include<algorithm>
using namespace std;
const int length = 25;
#pragma pack(push, 1)
struct tovar {
char name[length];
int price;
int amount;
int toGet;
};
#pragma pack(pop)
tovar arr[length];
tovar arr_out[length];
int index = 0;
int m... | TOOL | 0.899313 | 3.076432 |
da0d11a1-ee04-42ca-a874-2d31b286dfc1 | Puellaquae/Algorithms | LeetCode/1417.cpp | #include <iostream>
using namespace std;
class Solution {
public:
string reformat(string s) {
string dig = "", letter = "";
for (char c : s) {
if ('0' <= c && c <= '9') {
dig.push_back(c);
} else {
letter.push_back(c);
}
}... | ALGO | 0.999285 | 6.069769 |
aeb4b3de-892f-4deb-9322-0a7129af552c | FuangCao/cavan | mfc/app/Calculator/Arithmetic2.cpp | //=====================================arithmetic2.cpp============================
//ߣܸ
//ѧţ200600404071
//λѧԺ
//Ժϵϵ
//༶Y062
//ʱ䣺200863
long double Sin(long double a,int angle) //Ǻsin㲢ؽ
{
if(angle==0)
{
a=fmod(a,360);
if(a==0||fabs(a)==180)
return 0;
else
return sin(a*P/180);
}
else
{
a=fmod(a,2*P... | ALGO | 0.997347 | 3.412611 |
ace39d08-8675-44de-aea5-936530e5624a | EnthonyBohm/CLP | fractal.cpp | #include <iostream>
#include <complex.h>
#include <math.h>
#include <fstream>
#include <string>
using namespace std;
int main(int argc, char** argv) {
// Declaração das variáveis fora do escopo dos condicionais
int max_iter;
int width;
int height;
int i, j, k;
complex<double> center;
... | ALGO | 0.96596 | 4.460376 |
2e35eaf2-a3e2-425a-85d5-2771bc87c273 | aviraj4777/Programming | DSA/Recursion/count_and_Say_recursion.cpp | #include <bits/stdc++.h>
using namespace std;
void countAndSay(int n, string str[])
{
if (n == 0)
return;
int digit = n % 10;
n = n / 10;
countAndSay(n, str);
cout<<str[digit]<<" ";
}
int main()
{
system("cls");
string str[10] = {"Zero", "One", "Two", "Three", "Four", "Five", ... | ALGO | 0.999922 | 5.367584 |
5ae1e0c7-0198-4c07-8824-667d632b63d4 | sinian666/codes_86_4 | cpp_副本/chapter_stack_and_queue/array_queue.cpp | /**
* File: array_queue.cpp
* Created Time: 2022-11-25
* Author: Krahets (<EMAIL>)
*/
#include "../utils/common.hpp"
/* 基于环形数组实现的队列 */
class ArrayQueue {
private:
int *nums; // 用于存储队列元素的数组
int front; // 队首指针,指向队首元素
int queSize; // 队列长度
int queCapacity; // 队列容量
public:
Arra... | ALGO | 0.995933 | 5.57649 |
46322fd7-f9fc-489a-82e4-0aeb2735053b | mukesh567/ALL-DSA-PROBLEMS | queue/sumOfmaxiAndminiSubarrayInKsizeWindow.cpp |
#include <bits/stdc++.h>
using namespace std;
int solve(int *arr, int n, int k)
{
// declare dequeue
deque<int> maxi(k);
deque<int> mini(k);
int ans = 0;
// addition of first k size window
for (int i = 0; i < k; i++)
{
// maxi k liye
while (!maxi.empty() && arr[maxi.back(... | ALGO | 0.999979 | 5.071898 |
0ef00ade-4b98-44e1-964d-f642884ec302 | fredkerdraon/Reference-research | Maths/NeuralNetwork/OpenNN-master/opennn/conjugate_gradient.cpp | /****************************************************************************************************************/
/* */
/* OpenNN: Open Neural Networks Library ... | TOOL | 0.886472 | 6.057334 |
1f7dd399-bebd-468d-852b-12da8d7f5e7b | vidsinghal/Cornucopia | HashEnabledLLVM/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_cont.pass.cpp | // <queue>
// template <class InputIterator>
// priority_queue(InputIterator first, InputIterator last,
// const Compare& comp, const container_type& c);
#include <queue>
#include <cassert>
#include "test_macros.h"
int main(int, char**)
{
int a[] = {3, 5, 2, 0, 6, 8, 1};
const int n = siz... | TEST | 0.971264 | 4.833145 |
729908eb-e2da-40fd-b9f0-fabaac583eb0 | makio93/typical90 | 026/sol026a.cpp | // 026a 自力AC
// 自力解法: DFS,各頂点の深さによって塗分け
// 緑diff
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i=0; i<(int)(n); ++(i))
#define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i))
#define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i))
#define rep3r(i, m, n) for (int i... | ALGO | 0.999994 | 4.405068 |
db4a38c1-29ff-4090-ac56-30881a16443b | nirajsah004/Cipher-School-Niraj | Lecture 48-Cipher School-Niraj.cpp | #include <iostream>
using namespace std;
void attendclass(int start[],int end[],int class_id[]){
cout<<"Class are: "<<class_id[0]<<endl;
int end_of_current= end[0];
for(int i=1;i<9;i++){
if(start[i]>= end_of_current){
cout<<"Class are: "<<class_id[i]<<endl;
end_of_current ... | ALGO | 0.972522 | 3.824618 |
3f8e3839-1e48-40d5-a55e-4c660706a876 | qngnode/qnodecoin-pow | src/qt/transactionfilterproxy.cpp | #include "transactionfilterproxy.h"
#include "transactiontablemodel.h"
#include "transactionrecord.h"
#include <cstdlib>
#include <QDateTime>
// Earliest date that can be represented (far in the past)
const QDateTime TransactionFilterProxy::MIN_DATE = QDateTime::fromTime_t(0);
// Last date that can be represented (... | TOOL | 0.886507 | 6.738706 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.