[luoguP1981] 表达式求值(U?ェ?*U)
传送门
弄两个栈,一个存数,一个存运算符,然后乱搞。
代码
#include <cstdio> #include <cstring> #include <iostream> #define N 1000001 int n, top_d, top_f; int stack_d[N]; char s[N], stack_f[N]; bool b[N]; int main() stack_d[++top_d] = x; stack_f[++top_f] = s[i]; i++; while(i <= n) stack_d[++top_d] = x; if(stack_f[top_f] == '*') stack_f[++top_f] = s[i]; i++; } for(i = 1; i <= top_d; i++) stack_d[i] = (stack_d[i] + stack_d[i 1]) % 10000; printf("%d\n", stack_d[top_d]); return 0; }
模拟
spc文件怎么看,spc文件用什么打开?
0文件怎么看,0文件用什么打开?
sparseimage文件怎么看,sparseimage文件用什么打开?
sp文件怎么看,sp文件用什么打开?
dv文件怎么看,dv文件用什么打开?
soundpack文件怎么看,soundpack文件用什么打开?
dus文件怎么看,dus文件用什么打开?
dtw文件怎么看,dtw文件用什么打开?
spdf文件怎么看,spdf文件用什么打开?
0文件怎么看,0文件用什么打开?