6.3万

tianming
SHArk_Ice
Ang_2

mouoAa631547

djw
cow马

Dbei.
Spstar.

Z_626
OneOne666

acwing_6102

#include<iostream>
#include<string>
#include<algorithm>
#include <vector>
#include <cstdio>
#include <cmath>
#include <set>
#include <cstring>
#include <string>
#include <sstream>
using namespace std;
int main()
{
long long a,b,c,d,e;
cin >> a;
b = a / 1000;
c = b / 3600;
d = b % 3600 / 60;
e = b % 3600 % 60;
c %= 24;
if (c < 10)cout << "0";
cout << c << ":";
if (d < 10)cout << "0";
cout << d << ":";
if (e < 10)cout << "0";
cout<< e;
return 0;
}


#include <bits/stdc++.h>

using namespace std;
const int t = 105;

int a[t][t];

int main()
{
int n,m;
cin >> n >> m;

int left = 0, right = m - 1, top = 0, bottom = n - 1;
int k = 1;
while (left <= right && top <= bottom)
{
for (int i = left ; i <= right; i ++) {
a[top][i] = k ++;
}
for (int i = top + 1; i <= bottom; i ++) {
a[i][right] = k ++;
}
for (int i = right - 1; i >= left && top < bottom; i --) {
a[bottom][i] = k ++;
}
for (int i = bottom - 1; i > top && left < right; i --) {
a[i][left] = k ++;
}
left ++, right --, top ++, bottom --;
}
for (int i = 0; i < n; i ++)
{
for (int j = 0; j < m; j ++)
{
cout << a[i][j] << " ";
}
cout << endl;
}
return 0;
}


class Solution
{
public:
vector<int>findNumbersWithSum(vector<int>&nums,int target)
{
unordered_set<int> us;
for(int a:nums)
{
if(us.count(target-a))return vector<int>({target-a,a});
us.insert(a);
}
}
};


class Solution {
public:
vector<int> getLeastNumbers_Solution(vector<int> input, int k) {
sort(input.begin(),input.end());
vector<int>res;
for(int i=0;i<k;i++)res.push_back(input[i]);
return res;
}
};


class Solution {
public:
int getNumberOfK(vector<int>& nums , int k) {
int a=0;
for(int c:nums)
if(c==k)a++;
return a;
}
};


class Solution
{
public:
int a=0;
int getSum(int n)
{
if(n<1)return a;
a+=n;
n--;
return getSum(n);

}
};


class Solution
{
public:
string replaceSpaces(string &str) {
string res;
for (auto x : str)
if (x == ' ')
res += "%20";
else
res += x;
return res;
}
};


class Solution {
public:
int Fibonacci(int n) {
if (n == 0)
return 0;
else if (n == 1)
return 1;
else if (n == 2)
return 1;
else
return Fibonacci(n - 1) + Fibonacci(n - 2);
}
};


#include<iostream>
using namespace std;
int n,m;
int cnt=0;
int dfs(int x,int y)
{
if(x==n&&y==m) cnt++;
else
{
if(x<n) dfs(x+1,y);
if(y<m) dfs(x,y+1);
}
}
int main()
{
cin>>n>>m;
dfs(0,0);
cout<<cnt;
}


#include<iostream>
using namespace std;
int a,b;
void f(int k)
{
if(k==a)b++;
else if(k<a)
{
f(k+1);
f(k+2);
}
}
int main()
{

cin>>a;
f(0);
cout<<b;
return 0;
}