:=IF(MOD(A1/2,1)<=0.25,ROUND(A1/2,0)*2,ROUND...

403 Forbidden
You don't have permission to access /product-detail/.html
on this server.您已成功注册高顿网校
用&户&&名:
初始密码:(您手机后六位)
请尽快到个人中心 。
忘记密码,可点击“忘记密码”进行密码重置。
如有疑问请致电 400-825-0088
登录高顿网校
资料修改成功
失败提示失败提示
合作账号登录
超简单的个人所得税excel计算公式
发布时间: 17:20
来源:高顿网校
小编导读:
日开始,个税计算公式
  个税=ROUND(MAX((A6-3500)*{0.03,0.1,0.2,0.25,0.3,0.35,0.45}-{0,105,555,05,1)
  A6是工资减去应扣减的五金之后的余额
  试了几个没问题
  有待检查
  2、日开始,税后算税前公式(倒算税前)
  税前=IF(3500&(ROUND(MAX((A5-,555,05,13505})/(1-{0.03,0.1,0.2,0.25,0.3,0.35,0.4}))+3500,2)),(ROUND(MAX((A5-,555,05,13505})/(1-{0.03,0.1,0.2,0.25,0.3,0.35,0.4}))+3500,2)),A5)
  A5等于税后工资,不含应扣的社保费用等
  3、日开始,根据缴纳个税算应税工资
  应税工资=ROUND(MAX(A5/({0.03,0.1,0.2,0.25,0.3,0.35,0.45}-{0,105,555,05,13505}))+3500,2)
  A5等于缴纳的个税
  注意:年终奖时不适用
  4、日开始,年终奖个税计算公式
  年终奖个税=ROUND(IF(A13/12&1500,IF(A13/12&4500,IF(A13/12&9000,IF(A13/12&35000,IF(A13/12&55000,IF(A13/12&80000,IF(A13/12&,(A13*0.45-13505)),(A13*0.35-5505)),(A13*0.3-2755)),(A13*0.25-1055)),(A13*0.2-555)),(A13*0.1-105)),(A13*0.03)),2)
  注意:
  (1)如果当月工资不小于3500元时,则设A13为年终金;
  (2)如果当月工资小于3500元时,则设A13为年终金+当月工资减去五金等可扣除项后的余额
  精彩推荐:
Android Pad版
大家都在看的在线课程
加入你感兴趣的讨论群
题库交流群
注册会计师
关注官方微信
微信号:gaoduneclass
新版建议课程反馈题库反馈直播反馈
反馈内容(*必填)
亲爱的用户:欢迎您提供使用产品的感受和建议。我们无法逐一回复,但我们会参考您的建议,不断优化产品,为您提供更好的服务。
+ 上传图片
很愤怒刚学习不久,没法学啊要考试了,急死我了这次就不告诉你们老板了,限你们赶紧弄好算了,麻木了此可以使用目录功能哟↑(点击上方[+])
不知道是不是外国的缘故,卡了半个小时之后才进去,好不容易cf早了一次,还被这样玩,难过...
链接→Codeforces Round #363
Accept: 0 & &Submit: 0
Time Limit: 2000 MS & & Memory Limit : 256 M&
&Problem Description
There will be a launch of a new, powerful and unusual collider very soon, which located along a straight line. n particles will be launched inside it. All of them are located in a straight line and there can not be two or more particles located in the same
point. The coordinates of the particles coincide with the distance in meters from the center of the collider, xi is the coordinate of the i-th particle and its position in the collider at the same time. All coordinates of particle positions are even integers.
You know the direction of each particle movement -- it will move to the right or to the left after the collider's launch start. All particles begin to move simultaneously at the time of the collider's launch start. Each particle will move straight to the
left or straight to the right with the constant speed of 1 meter per microsecond. The collider is big enough so particles can not leave it in the foreseeable time.
Write the program which finds the moment of the first collision of any two particles of the collider. In other words, find the number of microseconds before the first moment when any two particles are at the same point.
The first line contains the positive integer n (1?≤?n?≤?200?000) -- the number of particles.
The second line contains n symbols &L& and &R&. If the i-th symbol equals &L&, then the i-th particle will move to the left, otherwise the i-th symbol equals &R& and the i-th particle will move to the right.
The third line contains the sequence of pairwise distinct even integers x1,?x2,?...,?xn (0?≤?xi?≤?10^9) -- the coordinates of particles in the order from the left to the right. It is guaranteed that the coordinates of particles are given in the increasing
In the first line print the only integer -- the first moment (in microseconds) when two particles are at the same point and there will be an explosion.
Print the only integer -1, if the collision of particles doesn't happen.
&Sample Input
/*Examples 1*/
/*Examples 2*/
&Sample Output
/*Examples 1*/
/*Examples 2*/
In the first sample case the first explosion will
happen in 1 microsecond because the particles number
1 and 2 will simultaneously be at the same point with
the coordinate 3.
In the second sample case there will be no explosion
because there are no particles which will simultaneously
be at the same point.
&Problem Idea
其实这道题简单来说就是给你一维坐标上的n个点(坐标及运动方向,各点速度一致),问最早相遇的两点所需的时间。
这题,显然,因为每个点的速度一样,所以只有相向而行的两点会相遇,即s[i]=='R'&&s[j]=='L'(j&i)的情况。
而最早相遇的两点,则必定是相邻点,于是j=i+1。
接下来就是暴力每点的方向,凡是前一点为'R',后一点为'L'的状况,都来求一下相遇时间,取最小值。这道题目就做完啦啊。
【时间复杂度&&优化】
题目链接→Codeforces 699A
&Source Code
/*Sherlock and Watson and Adler*/
#pragma comment(linker, &/STACK:,&)
#include&stdio.h&
#include&string.h&
#include&stdlib.h&
#include&queue&
#include&stack&
#include&math.h&
#include&vector&
#include&map&
#include&set&
#include&cmath&
#include&complex&
#include&string&
#include&algorithm&
#include&iostream&
#define exp 1e-10
#define bitnum(a) __builtin_popcount(a)
const int N = 200005;
const int M = 1005;
const int inf = ;
const int mod = ;
char s[N];
int main()
int n,i,Min=
bool flag=
scanf(&%d&,&n);
scanf(&%s&,s);
for(i=0;i&n;i++)
scanf(&%d&,&w[i]);
for(i=0;i&n;i++)
if(s[i]=='R')
Min=min(Min,(w[i]-w[i-1])/2);
if(Min!=inf)
printf(&%d\n&,Min);
puts(&-1&);
Accept: 0 & &Submit: 0
Time Limit: 1000 MS & & Memory Limit : 256 M&
&Problem Description
You are given a description of a depot. It is a rectangular checkered field of n?×?m size. Each cell in a field can be empty (&.&) or it can be occupied by a wall (&*&).
You have one bomb. If you lay the bomb at the cell (x,?y), then after triggering it will wipe out all walls in the row x and all walls in the column y.
You are to determine if it is possible to wipe out all walls in the depot by placing and triggering exactly one bomb. The bomb can be laid both in an empty cell or in a cell occupied by a wall.
The first line contains two positive integers n and m (1?≤?n,?m?≤?1000) -- the number of rows and columns in the depot field.
The next n lines contain m symbols &.& and &*& each -- the description of the field. j-th symbol in i-th of them stands for cell (i,?j). If the symbol is equal to &.&, then the corresponding cell is empty, otherwise it equals &*& and the corresponding cell is
occupied by a wall.
If it is impossible to wipe out all walls by placing and triggering exactly one bomb, then print &NO& in the first line (without quotes).
Otherwise print &YES& (without quotes) in the first line and two integers in the second line -- the coordinates of the cell at which the bomb should be laid. If there are multiple answers, print any of them.
&Sample Input
/*Examples 1*/
/*Examples 2*/
/*Examples 3*/
&Sample Output
/*Examples 1*/
/*Examples 2*/
/*Examples 3*/
&Problem Idea
给你n*m的矩阵,'.'表示空地,'*'表示墙,若在(x,y)处放置炸弹,可以炸掉第x行,第y列的所有墙。
问只放置一个炸弹能否将矩阵内的所有墙炸毁,若能,输出&YES&,以及炸弹放置的位置(矩阵从(1,1)开始,所有多个位置满足,输出任意一个),否则,输出&NO&。
这道题其实就是----
所有的墙是不是都在某一行某一列
首先预处理每个墙的位置属于哪一行哪一列,以及墙的总个数
然后暴力枚举矩阵中的每一点(x,y)作为炸弹放置的位置,若第x行第y列的墙个数之和等于墙的总个数,那就说明此点即为所求。
需要注意的一点是若(x,y)点有墙,那上述方法此位置会计算两次,故要去掉一个
【时间复杂度&&优化】
题目链接→Codeforces
&Source Code
/*Sherlock and Watson and Adler*/
#pragma comment(linker, &/STACK:,&)
#include&stdio.h&
#include&string.h&
#include&stdlib.h&
#include&queue&
#include&stack&
#include&math.h&
#include&vector&
#include&map&
#include&set&
#include&cmath&
#include&complex&
#include&string&
#include&algorithm&
#include&iostream&
#define exp 1e-10
#define bitnum(a) __builtin_popcount(a)
const int N = 1005;
const int M = 1005;
const int inf = ;
const int mod = ;
char s[N][N];
int r[N],c[N];
int main()
int n,m,k1,k2,i,j,k;
k=k1=k2=0;
scanf(&%d%d&,&n,&m);
for(i=1;i&=n;i++)
scanf(&%s&,s[i]+1);
for(i=1;i&=n;i++)
for(j=1;j&=m;j++)
if(s[i][j]=='*')
r[i]++,c[j]++,k++;
for(i=1;i&=n;i++)
for(j=1;j&=m;j++)
if(r[i]+c[j]+(s[i][j]=='*'?-1:0)==k)
puts(&YES&);
printf(&%d %d\n&,i,j);
puts(&NO&);
Accept: 0&&&&Submit: 0
Time Limit: 1000 MS & & Memory Limit :&256 M&
&Problem Description
Vasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of this n days: whether that gym opened and whether a contest was carried out in the
on that day. For the i-th day
there are four options:
on this day the gym is closed and the conteson this day the gym is closed and the coon this day the gym is open and the conteson this day the gym is open and the contest is carried out.
On each of days Vasya can either have a rest or write the contest (if it is carried out on this day), or do sport (if the gym is open on this day).
Find the minimum number of days on which Vasya will have a rest (it means, he will not do sport and write the contest at the same time). The only limitation that Vasya has --
he does not want to do the same activity on two consecutive days: it means, he will not do sport on two consecutive days, and write the contest on two consecutive days.
The first line contains a positive integer n (1?≤?n?≤?100) -- the number of days of Vasya's vacations.
The second line contains the sequence of integers a1,?a2,?...,?an (0?≤?ai?≤?3) separated by space, where:
ai equals 0, if on the i-th day of vacations the gym is closed and the contesai equals 1, if on the i-th day of vacations the gym is closed, but the coai equals 2, if on the i-th day of vacations the gym is open and the contesai equals 3, if on the i-th day of vacations the gym is open and the contest is carried out.
Print the minimum possible number of days on which Vasya will have a rest. Remember that Vasya refuses:
to do sport on any two consecutive days,to write the contest on any two consecutive days.
&Sample Input
/*Examples 1*/
/*Examples 2*/
1 3 3 2 1 2 3
/*Examples 3*/
&Sample Output
/*Examples 1*/
/*Examples 2*/
/*Examples 3*/
In the first test Vasya can write the contest on the day number 1 and do sport on the day number
3. Thus, he will have a rest for only 2 days.
In the second test Vasya should write contests on days number 1, 3, 5 and 7, in other days do
sport. Thus, he will not have a rest for a single day.
In the third test Vasya can do sport either on a day number 1 or number 2. He can not do sport
in two days, because it will be contrary to the his limitation. Thus, he will have a rest for
only one day.
&Problem Idea
有n天时间,Vasya每天只能做一件事(休息,锻炼,做题),且相邻两天不能做一样的事(休息除外),问n天时间至少要休息几天。
此外,每天会给你馆的开放情况以及上是否有比赛
只有体育馆开放才能锻炼,只有网络赛有比赛才能做题
显然,此题是一道dp题
故,首先我们要找到转移方程
令dp[i][j]表示第i天做j事所休息的天数(j:0~2
分别表示 休息,做题,锻炼)
相应的,我们可以得到转移方程
if(s[i]==0)//体育馆未开放,网上也没有比赛
dp[i][0]=min(min(dp[i-1][0],dp[i-1][1]),dp[i-1][2])+1;
else if(s[i]==1)//网上有比赛,体育馆未开放
dp[i][1]=min(dp[i-1][1]+1,min(dp[i-1][0],dp[i-1][2]));
dp[i][0]=min(min(dp[i-1][0],dp[i-1][1]),dp[i-1][2])+1;
else if(s[i]==2)//体育馆开放,网上没有比赛
dp[i][2]=min(dp[i-1][2]+1,min(dp[i-1][0],dp[i-1][1]));
dp[i][0]=min(min(dp[i-1][0],dp[i-1][1]),dp[i-1][2])+1;
else//体育馆开放,同时网上也有比赛
dp[i][1]=min(dp[i-1][1]+1,min(dp[i-1][0],dp[i-1][2]));
dp[i][2]=min(dp[i-1][2]+1,min(dp[i-1][0],dp[i-1][1]));
dp[i][0]=min(min(dp[i-1][0],dp[i-1][1]),dp[i-1][2])+1;
}而最终结果则为dp[n][0]~dp[n][2]三者的最小值
【时间复杂度&&优化】
题目链接→Codeforce 698A
&Source Code
/*Sherlock and Watson and Adler*/
#pragma comment(linker, &/STACK:,&)
#include&stdio.h&
#include&string.h&
#include&stdlib.h&
#include&queue&
#include&stack&
#include&math.h&
#include&vector&
#include&map&
#include&set&
#include&cmath&
#include&complex&
#include&string&
#include&algorithm&
#include&iostream&
#define exp 1e-10
#define bitnum(a) __builtin_popcount(a)
const int N = 105;
const int M = 1005;
const int inf = ;
const int mod = ;
int s[N],dp[N][3];
int main()
int n,i,j;
scanf(&%d&,&n);
for(i=1;i&=n;i++)
scanf(&%d&,&s[i]);
for(j=0;j&3;j++)
for(i=1;i&=n;i++)
if(s[i]==0)
dp[i][0]=min(min(dp[i-1][0],dp[i-1][1]),dp[i-1][2])+1;
else if(s[i]==1)
dp[i][1]=min(dp[i-1][1]+1,min(dp[i-1][0],dp[i-1][2]));
dp[i][0]=min(min(dp[i-1][0],dp[i-1][1]),dp[i-1][2])+1;
else if(s[i]==2)
dp[i][2]=min(dp[i-1][2]+1,min(dp[i-1][0],dp[i-1][1]));
dp[i][0]=min(min(dp[i-1][0],dp[i-1][1]),dp[i-1][2])+1;
dp[i][1]=min(dp[i-1][1]+1,min(dp[i-1][0],dp[i-1][2]));
dp[i][2]=min(dp[i-1][2]+1,min(dp[i-1][0],dp[i-1][1]));
dp[i][0]=min(min(dp[i-1][0],dp[i-1][1]),dp[i-1][2])+1;
printf(&%d\n&,min(min(dp[n][0],dp[n][1]),dp[n][2]));
Accept: 0&&&&Submit: 0
Time Limit: 2000 MS & & Memory Limit : 256 M&
A tree is an undirected connected graph without cycles.
Let's consider a rooted undirected tree with n vertices, numbered 1 through n. There are many ways to represent such a tree. One way is to create an
array with n integers p1,?p2,?...,?pn, where pi denotes a parent of vertex i (here, for convenience a root is considered its own parent).
For this rooted tree the array p is [2,?3,?3,?2].
Given a sequence p1,?p2,?...,?pn, one is able to restore a tree:
A sequence p1,?p2,?...,?pn is called valid if the described procedure generates some (any) rooted tree. For example, for n?=?3 sequences (1,2,2), (2,3,1)
and (2,1,3)
You are given a sequence a1,?a2,?...,?an, not necessarily valid. Your task is to change the minimum number of elements, in order to get a valid sequence.
Print the minimum number of changes and an example of a valid sequence after that number of changes. If there are many valid sequences achievable in the minimum number of changes, print any of them.
The first line of the input contains an integer n (2?≤?n?≤?200?000) -- the number of vertices in the tree.
The second line contains n integers a1,?a2,?...,?an (1?≤?ai?≤?n).
In the first line print the minimum number of elements to change, in order to get a valid sequence.
In the second line, print any valid sequence possible to get from (a1,?a2,?...,?an) in the minimum number of changes. If there are many such sequences, any of them will be accepted.
/*Examples 1*/
/*Examples 2*/
/*Examples 3*/
2 3 5 4 1 6 6 7
/*Examples 1*/
/*Examples 2*/
/*Examples 3*/
2 3 7 8 1 6 6 7
&Problem Idea
【trick&&吐槽】
In the first sample, it's enough to change one element. In the provided output, a sequence represents a tree rooted in a vertex 4 (because p4?=?4), which you can see on the left drawing below. One of other correct solutions
would be a sequence 2 3 3 2, representing a tree rooted in vertex 3 (right drawing below). On both drawings, roots are painted red.
In the second sample, the given sequence is already valid.
给你一个序列,序列中的第i个数pi是节点i的父亲节点,问至少需要变动几个,使得该序列能够构成一棵树,根节点的父亲节点为本身
显而易见,非法序列的情况有两种:
①出现环,树是无环的,一旦出现环,说明该序列构不成一棵树
②因为题目要求是一棵树,故根节点只有一个,出现多个根节点必定是非法序列
而情况②可以并到①中处理,因为根节点的父亲节点是本身,可以看成是自环
接下来处理就方便了,用dfs判断未处理的节点,是否会构成环,一旦构成环,我们就需要把环拆开,将环中的任意一点指向根节点,若当前无根节点,则指向该点自身,并把此点作为整棵树的根节点,处理一遍就可以了
【时间复杂度&&优化】
题目链接→Codeforce
&Source Code
/*Sherlock and Watson and Adler*/
#pragma comment(linker, &/STACK:,&)
#include&stdio.h&
#include&string.h&
#include&stdlib.h&
#include&queue&
#include&stack&
#include&math.h&
#include&vector&
#include&map&
#include&set&
#include&cmath&
#include&complex&
#include&string&
#include&algorithm&
#include&iostream&
#define exp 1e-10
#define bitnum(a) __builtin_popcount(a)
const int N = 200005;
const int M = 1005;
const int inf = ;
const int mod = ;
int s[N],k,Max,a[N],v[N];
void dfs(int x)
if(!v[s[x]])
dfs(s[x]);
else if(v[s[x]]==1)
s[x]=x,k++,Max=x;
int main()
int n,i,ans=0;
scanf(&%d&,&n);
for(i=1;i&=n;i++)
scanf(&%d&,&s[i]);
a[i]=s[i];
if(i==s[i])
k++,Max=max(Max,i);
for(i=1;i&=n;i++)
for(i=1;i&=n;i++)
if(s[i]!=a[i])
printf(&%d\n&,ans);
for(i=1;i&=n;i++)
printf(&%d%c&,s[i],i!=n?' ':'\n');
菜鸟成长记

参考资料

 

随机推荐